threading.Event file descriptor

elbertlev at gmail.com elbertlev at gmail.com
Sun Apr 3 17:10:41 EDT 2005


Nicolas Fleury wrote:
> Hi,
> Is there any way to get the file descriptor on Unix or handle on
Windows
> associated internally with a threading.Event object?  So that it can
be
> used in a call to select or WaitForMultipleObjects.
> Thx and regards,
> Nicolas

Good idea! But...

There is no event handle used in Event object (for NT at least). Do not
know about Linux...

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).




More information about the Python-list mailing list