4 ms·
The most interesting part to me is the "generator function", which basically allows for cooperative scheduling. This would put an end to spaghetti callbacks wh
by juliennakache 15y ago
The most interesting part to me is the "generator function", which basically allows for cooperative scheduling.
This would put an end to spaghetti callbacks when doing blocking I/O operations. Very similar to EM-Synchrony for EventMachine/Ruby and (I guess) Inline Callbacks in Twisted/Python.
This and the new module would be a blast for Node.JS !
- wladimir 15y agoand (I guess) Inline Callbacks in Twisted/Python Python has had real generators (using the yield keyword) for a long time... See http://www.python.org/dev/peps/pep-0255/ http://www.python.org/dev/peps/pep-0255/ .
- bitanarch 15y agoPython has been having coroutine based, cooperative scheduled I/O for a long time.. go read about gevent and eventlet.