Hacker News new | ask | show | jobs
by bsder 1919 days ago
> Is there any thought to including a default executor in the standard library?

This is more difficult than you think, and you probably don't want the current async stuff to anchor to a weak implementation.

For example, at least one of the current Rust async things doesn't work when pointed to UNIX/Linux character device file descriptors.

2 comments

I hope not. Then it would be hard to turn async off.

My general position on this is that all-async (like Javascript) is OK, and all-threaded is OK, and all green threads (like Go's goroutines) are OK. But those concepts do not play well together in the same program.

GHC is ok at mixing OS threads and green threads. You launch an OS thread if you want it to make blocking system calls etc. But from the user perspective it's just like a "normal" (green) thread, uses the same mutexes etc.
Are you talking about mio? If so, that might be the bug I've been trying to find all week.