[Stackless] API suggestions
Oren Tirosh
oren-slp at hishome.net
Wed Mar 26 14:25:02 CET 2003
On Wed, Mar 26, 2003 at 12:41:33PM +0100, Sune Kirkeby wrote:
> [ Oren Tirosh ]
> > 1. Represent each channel with two separate objects - one for the
> > sender and one of the receiver side. The reference counts of the
> > two objects are tracked separately. This can be useful for debugging:
> > a tasklet will not block on sending to a channel with no receivers
> > or attempting to receive from a channel with no senders. Instead
> > an exception will be raised immediately.
>
> Something like the attached? (It does not expose other channel
> methods or attributes than send/send_exception/receive, but that
> should be an easy).
Nice. I was thinking of using destructors. It never occured to me to
use weak references for that. Using a Python wrapper is a little
expensive, though. I'd prefer a C solution.
Oren
_______________________________________________
Stackless mailing list
Stackless at www.tismer.com
http://www.tismer.com/mailman/listinfo/stackless
More information about the Stackless
mailing list