[EMAIL PROTECTED] 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

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to