Opened 16 years ago

Last modified 16 years ago

#762 enhancement closed fixed (fixed)

The spewer (i.e. twistd --spew) only spews for the main thread

Reported by: spiv Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: spiv Branch:


Change History (5)

comment:1 Changed 16 years ago by spiv

It would be nice if the spewer logged function calls in all threads.  This
requires running sys.settrace(spewer) in each thread, but twistd only does this
in the main thread.

The least intrusive way to get it to work for other threads would probably be to
make twisted.python.threadpool.ThreadPool._worker install it too, if some sort
of global flag is set.

A slightly more evil option would be to monkey-patch the thread or threading
modules to intercept all thread creation...

comment:2 Changed 16 years ago by Jean-Paul Calderone

The right implementation for this, I think, is threading.settrace().

comment:3 Changed 16 years ago by spiv

Ooh, yes, good point.  I didn't know about that...

I might do that now.

comment:4 Changed 16 years ago by spiv

Fixed in r12244.

comment:5 Changed 9 years ago by <automation>

Owner: spiv deleted
Note: See TracTickets for help on using tickets.