6 ms·
why not just use node-fibers?
by tjholowaychuk 15y ago
why not just use node-fibers?
- maxtaco 15y agoA key advantage of fibers of course is that they preserve exception semantics, whereas tame can't in all cases. I'm not too interested in reviving the stalemated thread v. event religious war. I prefer explicitly-managed events, but if others prefer a more thread-like API, by all means....
- jrockway 15y agoIn the end, both are the same thing; managing action-specific state in an application-defined per-action data structure. With OS threads, you let the OS manage the state instead. This can be inefficient with a large number of actions, because most of the state kept has nothing to do with the application itself; it's OS bookkeeping overhead.
- sandstrom 15y agoI remember reading something about fibers from Asana (maybe thats the same as node-fibers): http://asana.com/2010/10/adding-fibers-to-v8-efficiency-clarity-in-ssjs/ http://asana.com/2010/10/adding-fibers-to-v8-efficiency-clar...
- tlrobinson 15y agoSame idea, not the same implementation: https://github.com/laverdet/node-fibers https://github.com/laverdet/node-fibers