4 ms·
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 blockin
by ibraheemdev 6y ago
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
- bkolobara 6y agoThere 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 https://github.com/bkolobara/async-wormhole
- mwcampbell 6y agoDid 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.
- ibraheemdev 6y agoI 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 https://github.com/async-rs/async-std/pull/733