sys.settrace for all threads

Richie Hindle richie at entrian.com
Sun Oct 6 05:40:19 EDT 2002


Hi Martin,

> > Is there a cleaner and more future-proof way of doing this?
> 
> No.

That's what I thought you'd say.  8-(

> Your approach won't work very well, either, since threads can come
> out nowhere: A C module may create threads, and just temporarily enter
> Python from the thread.

Yes.  I was hoping that these omniORBpy threads would always be
created by Python code.  As it turns out, I can use omniORBpy's own
hooking system so it doesn't matter in this case.

> You might want to try writing a PEP

That's a good idea - whether or not we can work around the problem in
the omniORBpy case, I think a way to set the trace function for all
threads would be useful.  Whether I have the time is another matter...

-- 
Richie Hindle
richie at entrian.com



More information about the Python-list mailing list