-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC 2: Async #22
Comments
IO isn't async for the process that is calling it by default. I'm not sure how the Async IO operations work in fsharp but if you need to look into doing them in more of an async manner you can. This is the blocking code: https://github.com/elixir-lang/elixir/blob/master/lib/logger/lib/logger/backends/console.ex |
Thanks for the comments. Fsharp async (and c# async for that matter) is mostly a hack around the fact that .NET allows you to block the calling thread when doing io. Erlang doesn’t allow this as naturally there is no direct interaction with threads. So when I said non blocking above I meant it in the .NET sense. :) I admit that isn’t clear. Async can also be used to dispatch work on the threadpool which has a better translation to erlang. I’ve implemented this partly already where async.start will spawn a new process to execute a computation on. |
Couldn't you go for Hopac now that you have a chance to do it well? It's a much stronger, more stable abstraction than Async. |
See my comment in #34 |
All IO in erlang is "async" (non blocking) so for that kind of code async can effectively be erased.
In the case of
Async.Start*
we could potentially compile these to spawn new processes to provide parallelism. It would require careful design but may be worthwhile.The text was updated successfully, but these errors were encountered: