Current execution frame of another thread?

Diez B. Roggisch deets at nospam.web.de
Thu Nov 17 19:35:14 CET 2005


skip at pobox.com wrote:
> I would like to try a sampling approach to profiling.  My thought is to have
> a profiling thread that samples the execution frame of all the other
> started threads.  I don't see any path from the threads returned by
> threading.enumerate() to their current frames.  Am I missing something?


Just another thought: Maybe stackless python can be of use here - as it 
epxlicits the stack frame, you might be able to inspect it. But I 
_think_ basically the same limitations apply as in my other post - you'd 
need to be able to stop a thread, scan its frame, and reschedule it.

Diez



More information about the Python-list mailing list