A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-September/056871.html below:

[Python-Dev] Pythonic concurrency - cooperative MT

[Python-Dev] Pythonic concurrency - cooperative MT [Python-Dev] Pythonic concurrency - cooperative MTSimon Wittber simonwittber at gmail.com
Fri Sep 30 16:32:55 CEST 2005
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.
More information about the Python-Dev mailing list

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