asyncore: suggested patch

Courageous jkraska1 at san.rr.com
Sun May 27 00:41:14 EDT 2001


>Timeoutsocket doesn't handle nonblocking sockets (yet), and it would 
>hardly be helpful if it did.

Well, a general communications abstraction which offers an abstract possibility
which can be satisfied by a variety of possibly futures would be useful. For
example, the possibility of interest in this particular case could be satisified by
either the delivery of the data or arrival of the maximum time of delivery.

Users of the api, when desiring asynchronous communications, would claim
futures and set up notifiers for the occurances of these futures. Synchronous
communication with the same API simply becomes an invocation of the very
same API with an argument indicating that the function should not return until
the future is satisifed by one of the many possible conditions which will
satisify it.

This is a generalization of a very old design pattern.

C//




More information about the Python-list mailing list