On 9/30/05, Antoine Pitrou <solipsis at pitrou.net> wrote: > > > (C) That scheduler is non-preemptive. A single > > greedy generator can starve all the others. > > Instead of looking at this as a problem, you could look at it as a > feature. Since generators can't be switched at arbitrary places, the > programmer has to define his/her synchronization points explicitly. I use this approach extensively, using tasks which are defined using generators. The scheduler I developed for this can be viewed here: http://metaplay.dyndns.org:82/svn/nanothreads/nanothreads.py Synchronization using yield statements is an important feature, as I use these cooperative threads for game development. These threads are _very_ useful for games, as they have very low overhead, and allow the programmer to exercise more control over their execution. Sw.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4