Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. def _is_owned(self):
  2. # Return True if lock is owned by current_thread.
  3. # This method is called only if __lock doesn't have _is_owned().
  4. if self.__lock.acquire(0):
  5. self.__lock.release()
  6. return False
  7. else:
  8. return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement