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/2007-February/071163.html below:

[Python-Dev] microthreading vs. async io

[Python-Dev] microthreading vs. async io"Martin v. Löwis" martin at v.loewis.de
Thu Feb 15 08:39:59 CET 2007
dustin at v.igoro.us schrieb:
> Asyncore *only* implements asynchronous IO -- any "tasks" performed in
> its context are the direct result of an IO operation, so it's hard to
> say it implements cooperative multitasking (and Josiah can correct me if
> I'm wrong, but I don't think it intends to).

I'm trying to correct you: By your definition, asyncore implements
cooperative multi-tasking. You didn't define 'task', but I understand
it as 'separate activity'. With asyncore, you can, for example, run
a web server and an IRC server in a single thread, as separate tasks,
and asyncore deals with the scheduling between these tasks.
In your terminology, it is based on continuations: the chunk you specify
is the event handler.

Indeed, asyncore's doc string starts with

# There are only two ways to have a program on a single
# processor do "more than one thing at a time".

and goes on suggesting that asyncore provides one of them.

Regards,
Martin

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