[Stackless] Tracing stackless tasklets.

Christian Tismer tismer at stackless.com
Tue Oct 2 01:32:17 CEST 2007


Richard Tew wrote:
> On 10/1/07, Vilhelm Sævarsson <vilhelmenator at gmail.com> wrote:
>> Now you need to call sys.settrace within the running tasklet and manually
>> set the f_trace for the tasklet.
>>
>> Is this a bug or a design flaw?
> 
> Neither.  It is what you have to do, in order to get the behaviour you
> are doing it to get. Calling sys.settrace does not modify the f_trace
> of the current frame in native Python and correspondingly it should
> not do it in Stackless.
> 
> I think that Stackless could use some mechanism to place tracing and
> profiling callbacks for newly started tasklets though, before they are
> run.  There is no reason that needs to be such a convoluted process,
> like it is now.

Do you think of something around

t = tasklet()
t.bind(myfunc)
t.setup(args, arg2)
t.set_trace(tracefunc)

?

Do you think the process is more convoluted than for regular Python,
in the sense that you have to modify your program, which is regular
for me, or is it harder?

cheers - chris

-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
tismerysoft GmbH             :     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 802 86 56  mobile +49 173 24 18 776  fax +49 30 80 90 57 05
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
       whom do you want to sponsor today?   http://www.stackless.com/




More information about the Stackless mailing list