Message23798
Logged In: YES
user_id=31435
Presumably, by changing threading.Semaphore to stop using
any code from threading.py, then threading.currentThread()
never gets called and so a _DummyThread is never created
then.
I expect the reason a _DummyThread causes Event leaks is
just that Thread.__init__ always ends up allocating a Python
lock (Thread.__block), which allocates a Windows Event
under the covers.
It *could* be that Thread.__block is never actually used for
dummy threads, in which case we could avoid allocating it in
that case (or could get rid of it right way in
_DummyThread.__init__). The dummy thread would still clog
the _active dict, but wouldn't leak Events then.
It's certainly true that Python has no way to know when a
thread it didn't start goes away. |
|
Date |
User |
Action |
Args |
2007-08-23 14:28:38 | admin | link | issue1089632 messages |
2007-08-23 14:28:38 | admin | create | |
|