A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-January/019521.html below:

[Python-Dev] thread_foobar.h routines

[Python-Dev] thread_foobar.h routines [Python-Dev] thread_foobar.h routinesGuido van Rossum guido@python.org
Tue, 15 Jan 2002 22:33:08 -0500
> I'm writing thread routines for the Plan 9 port of Python.
> 
> Is it correct that:
> 
> 	PyThread_acquire_lock returns 1 on success, 0 on failure.
> 	PyThread_down_sema returns 0 on success, -1 on failure.
> 
> It appears that way, but the inconsistency bothers me.

Me too.  The PyThread_*_sema routines are not used, and I would
recommend that you not bother implementing them at all.  (If anyone
used them, we would have heard a complaint -- in some thread
implementations these return -1 for failure, in others 0.  :-)

We should cut these out of the sources.

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



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4