[Stackless] tracing stackless events
Andrew Dalke
dalke at dalkescientific.com
Fri Dec 21 02:10:45 CET 2007
On Dec 21, 2007, at 1:50 AM, Christian Tismer wrote:
>> - the code for calling the channel callback silently swallows
>> any exceptions raised during the callback. It should at least
>> dump the traceback to stderr.
>
> Well, this was designed for debugging the application, not buggy
> debugging code. But well, could be done.
Quis debugiet ipsos debuges? (Completely fake latin transleration;
whats "debug" in Latin?)
Sometimes the debugger needs debugging.
>> - I would like to assign a name and perhaps a group name or
>> other properties to the tasklet and channel. That makes it easier
>> to debug. But they are C types and I can't. I had to use a weak
>> dictionary instead.
>
> I agree that this is hard for the main tasklet, which will be your
> own creation in another future release.
> But then, why are you not using inheritance, this is exactly what
> it is meant for.
Yes, that works. I was thinking about what to do if I don't have
control of the library which makes the tasklet. I was also thinking
of the related 'threading' API which has
__init__(self, group=None, target=None, name=None,
args=(), kwargs=None, verbose=None)
Mapping that to a Stackless call is
tasklet(target)(*args, **kwargs)
(Interesting. The Python docs don't mention the 'verbose' flag.)
What's left out is 'name' and 'group'. But 'group' is meant for
thread groups. Didn't know that either.
Anyway, I was also trying to come up with a reason for why having a
tasklet name is useful. I think it's only for debugging.
Andrew
dalke at dalkescientific.com
More information about the Stackless
mailing list