[ python-Bugs-1234979 ] Lock.acquire treats only 1 as True
SourceForge.net
noreply at sourceforge.net
Fri Jul 8 23:59:55 CEST 2005
Bugs item #1234979, was opened at 2005-07-08 23:25
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1234979&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Threads
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Chris Perkins (cperkins)
>Assigned to: Raymond Hettinger (rhettinger)
Summary: Lock.acquire treats only 1 as True
Initial Comment:
Lock.acquire takes an argument indicating whether or
not to block.
On Windows, an argument of 1 (or True) is treated as
True, and any other number is treated as False.
The problem is in PyThread_acquire_lock, in thread_nt.h.
Although I haven't tried it on any other platform,
looking at a random sample (thread_pthread.h and
thread_solaris.h), it looks to me like other platforms
do it right.
----------------------------------------------------------------------
>Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-07-08 23:59
Message:
Logged In: YES
user_id=1188172
Attaching a patch fixing that. Of course, the change is
slightly backwards-incompatible, so should we do that?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1234979&group_id=5470
More information about the Python-bugs-list
mailing list