News for hackers. Stuff that matters.
Re:Writing Rust the Elixir Way by ibraheemdev on Monday November 30, 2020 @10:19AM (#25254618)
async-std has been doing this for a while. The runtime detects blocking tasks automatically and offloads them to a seperate thread.

EDIT: The automatic blocking detection of async-std was abandoned after further discussion

Re:Writing Rust the Elixir Way by bkolobara on Monday November 30, 2020 @10:35AM (#25254801)
There is an important difference here. In Lunatic all syscalls are non-blocking, they are not just offloaded to a separate thread. However, they look like regular "blocking" functions from the developer's perspective. Under the hood Lunatic uses async-wormhole[0] to make this work.

[0]: https://github.com/bkolobara/async-wormhole

Re:Writing Rust the Elixir Way by mwcampbell on Monday November 30, 2020 @10:35AM (#25254803)
Did that actually go into a release? The last I heard was that they tried it on a branch about a year ago and then abandoned it.
Re:Writing Rust the Elixir Way by ibraheemdev on Monday November 30, 2020 @10:47AM (#25254952)
I though it had been merged but it looks like they remove the auto blocking detection and merge a revised version of the runtime [1].

1: https://github.com/async-rs/async-std/pull/733