threading.Event file descriptor
Nicolas Fleury
nid_oizo at yahoo.com_removethe_
Sun Apr 3 18:19:10 EDT 2005
elbertlev at gmail.com wrote:
> There is no event handle used in Event object (for NT at least). Do not
> know about Linux...
And there's no handle at all? It's not important if it's not an event
handle as long as it is an handle usable with WaitForMultipleObjects.
Also, I don't understand how it will be possible to implement
threading.Event without using finally, at the lower level, a handle,
since as far as I know this is the mechanisms the OS offers.
> Unless you want to rewrite the interpreter (namelly
> PyThread_allocate_lock.c) for platforms you are talking about, you
> would be better of, if you create your own class (derived from Event,
> and ovewritte aquire, release and wait methods).
I wouldn't want to derive from Event since my goal would be to submit a
patch to make subprocess.Popen.wait take an optional threading.Event to
kill the process.
Regards,
Nicolas
More information about the Python-list
mailing list