logoalt Hacker News

elcritch • today at 10:21 AM • 3 replies • view on HN

> it allows the async implementation to do the "prepare operation, suspend until completed, wake up" dance, where the threaded implementation would just run the blocking syscall directly. There are plans to add stackless coroutines

Yeah so that's a lot of hidden magic and implicit logic. ¯\_(ツ)_/¯


Replies

lukaslalinsky • today at 2:23 PM

While you could say that, all the operations are documented behavior. You need to assume they will block. If the blocking happens in userspace runtime or in the kernel doesn't matter. And you, as the application author, are the one choosing which runtime to use. This just allows the libraries to be generic.

Zambyte • today at 1:00 PM

It's all implemented as explicit userspace code that follows the same rules as the rest of the language. There is quite literally no implicit logic.

➕ show 1 reply
boomlinde • today at 11:40 AM

Hidden from those who don't read it.