Message50799
Logged In: YES
user_id=1126061
Your first solution, where the threading module in the
standard library would check for any sort of recursion
problem before trying to acquire the _active_limbo_lock, if
say, it _does_ try to acquire _active_limbo_lock is it's
already locked, what is the solution? It's probably not a
good idea for threading.enumerate() to not return anything.
How about unsetting/resetting the _trace_hook/_profile_hook
around locked sections of code? This is pretty much the same
as the developer of a tracing function using your idea of
asking for _active_limbo_lock in their func except that it'd
be transparent to them. This might be a vialbe solution, as
long as it's clearly documented somewhere that this is what
happens.
It might just be a better solution to paste something in the
threading docs such as "Don't call these functions from
within tracing functions in threaded code" and a list of
functions that are problematic, leaving the responsibility
of this solely on the developer. I have no idea.
But yes, thanks for pulling me up on the fact taht this
patch is incomplete and doesn't fix all cases.
Matt |
|
Date |
User |
Action |
Args |
2007-08-23 15:53:53 | admin | link | issue1531859 messages |
2007-08-23 15:53:53 | admin | create | |
|