[Python-Dev] semaphore support in thread_*.h

Guido van Rossum guido@python.org
Mon, 26 Jun 2000 16:28:16 -0500


> I noticed that the support for the semaphore calls in the various thread_*
> is very very spotty, with a comment in the BeOS implementation that read:
> 
>  * Guido says not to implement this because it's not used anywhere;
>  * I'll do it anyway, you never know when it might be handy, and it's
>  * easy...
> 
> (that last bit is not true of all implementations, apparently =).
> 
> 1) Is it true that the sema_ calls are never used?
> 
> 2) If yes, shouldn't we remove the sema_ calls from the thread API and have
> similar functionality on all platforms?
> 
> (There are related issues re: for example whether async thread locking is
> available, whether threads are joinable or not (see thread_cthread.h), etc.)

The sema_ calls aren't used anywhere in the current source.  I'd be
for removing them.  I'm not even sure why they are there -- maybe
Sjoerd remembers?  (This code was once part of something else than
Python.)

--Guido van Rossum (home page: http://www.python.org/~guido/)