3 ms·
You don't inspect the function, but the result. Is it a coroutine ? If so, it needs to be awaited (see my example above). I believe this also would allow non-a
by 1337shadow 6y ago
You don't inspect the function, but the result. Is it a coroutine ? If so, it needs to be awaited (see my example above).
I believe this also would allow non-async function to return a coroutine I suppose.
Anyway, in this case chances are that there will be no performance overhead if there's any io bound operation running in the coroutine so it should run the iscoroutine check of the result and the await call before the function is done.