[issue3339] dummy_thread LockType.acquire() always returns None, should be True or False
report at bugs.python.org
Fri Jul 11 09:52:35 CEST 2008
New submission from Henk Punt <henkpunt at gmail.com>:
Class LockType always seems to be returning None if waitflag is not
If you look up the documentation for the non dummy lock in lib ref
15.3.1 , none of the possible
results should be ‘None’, in fact it would always return True, except
when non-block is specified
And another thread is already holding the lock then it would return False
>From the docs on acquire():
Acquire a lock, blocking or non-blocking.
When invoked without arguments, block until the lock is unlocked, then
set it to locked, and return true.
When invoked with the blocking argument set to true, do the same thing
as when called without arguments, and return true.
When invoked with the blocking argument set to false, do not block. If a
call without an argument would block, return false immediately;
otherwise, do the same thing as when called without arguments, and
components: Library (Lib)
title: dummy_thread LockType.acquire() always returns None, should be True or False
versions: Python 2.5
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list