diff options
Diffstat (limited to 'Lib/mutex.py')
-rw-r--r-- | Lib/mutex.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/mutex.py b/Lib/mutex.py index 2348a2e..47d2ca2 100644 --- a/Lib/mutex.py +++ b/Lib/mutex.py @@ -24,12 +24,12 @@ class mutex: def testandset(self): """Atomic test-and-set -- grab the lock if it is not set, - return true if it succeeded.""" + return True if it succeeded.""" if not self.locked: self.locked = 1 - return 1 + return True else: - return 0 + return False def lock(self, function, argument): """Lock a mutex, call the function with supplied argument |