Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def _is_owned(self):
- # Return True if lock is owned by current_thread.
- # This method is called only if __lock doesn't have _is_owned().
- if self.__lock.acquire(0):
- self.__lock.release()
- return False
- else:
- return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement