static async ValueTask <T> SlowExecuteValueCall(SingleThreadInvoker @this, ICall <T> call) { await @this.WaitForExecutionSlot(); try { return(await call.Invoke()); } finally { @this.ReturnExecutionSlot(); } }
static bool FastExecuteValueCall(SingleThreadInvoker @this, ICall <T> call, out ValueTask <T> valueTask) { try { valueTask = call.Invoke(); } catch { @this.ReturnExecutionSlot(); throw; } return(valueTask.IsCompleted); }