[Stackless] API suggestions
tismer at tismer.com
Fri Mar 28 03:58:12 CET 2003
Oren Tirosh wrote:
> 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.
No problem to get a C version. I just need to wind my brain
around that a little more. Sounded not bad so far, but still
a little foreign. My fault, anyway.
Will try to swallow the idea again, tomorrow!
cheers - chris
Christian Tismer :^) <mailto:tismer at tismer.com>
Mission Impossible 5oftware : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/
14109 Berlin : PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34 home +49 30 802 86 56 pager +49 173 24 18 776
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
Stackless mailing list
Stackless at www.tismer.com
More information about the Stackless