Comment by mrkeen

1 year ago

> it should be possible to implement functions that can be called in both sync and async contexts, removing the need for function coloring.

It is possible! They're called blue (sync) functions.

Sync functions that block (e.g. perform a system call) cannot be called from async functions.

(Actually, they can, but you're going to stop the whole scheduler, or at least one of its worker threads, which is something you really don't want to do...)