(self)
| 319 | self._lock.acquire() # Ignore saved state |
| 320 | |
| 321 | def _is_owned(self): |
| 322 | # Return True if lock is owned by current_thread. |
| 323 | # This method is called only if _lock doesn't have _is_owned(). |
| 324 | if self._lock.acquire(False): |
| 325 | self._lock.release() |
| 326 | return False |
| 327 | else: |
| 328 | return True |
| 329 | |
| 330 | def wait(self, timeout=None): |
| 331 | """Wait until notified or until a timeout occurs. |