Add awaitable lambda execution, like Task.Run()
thorium-cfx opened this issue · 0 comments
thorium-cfx commented
Goal
Run lambdas directly and allow await
when they are being rescheduled
Importancy
Quality of Life (QoL)
API and/or potential implementation
API
Coroutine Coroutine.Run(Func<Coroutine> func)
and potentially others found in MS Task.Run specification
Implementation
Could be something like this:
return await new Func<Coroutine>(async () =>
{
// our lambda
})();
Extra
No response