4 ms·
> yield is shallow, caller must be ready to cope with yielding explicitly TFA invokes C#'s `await` which is also cooperative and "shallow". Granted in C# there
by masklinn 13y ago
> yield is shallow, caller must be ready to cope with yielding explicitly
TFA invokes C#'s `await` which is also cooperative and "shallow". Granted in C# there are APIs available for a synchronous function to "block on" an asynchronous one, but aside from that it's equivalent (the limitations are those of the underlying platforms, core.async loses the same features when doing from Clojure/JVM to ClojureScript/JS).
> so it's not really a good replacement to proper coroutines that can pause arbitrary deep stacks.
I agree, but I foremost went with the examples of "doing it better" which TFA provided, and TFA used `await` (if he'd used gevent or Erlang, I'd have been hosed)