3 ms·
Cooperative threads are implemented in terms of events. GHC's thread system and IO manager is implemented in terms of epoll, for example.
by Peaker 15y ago
Cooperative threads are implemented in terms of events.
GHC's thread system and IO manager is implemented in terms of epoll, for example.
- tptacek 15y agoPrograms that use cooperative thread scheduling are written very different than programs that use events directly. At the end of the day, every networked program on your computer is implemented in terms of interrupt service routines, but that doesn't make Firefox a driver.
- Peaker 15y agoI'm just saying that events may be evil as a general purpose mechanism. But they are useful at the implementation layer of the less "evil" general purpose mechanisms. And when I write performance-oriented C code, I use events, because great tight resource control is facilitated by that style.