(self)
| 326 | self._lock.acquire() # Ignore saved state |
| 327 | |
| 328 | def _is_owned(self): |
| 329 | # Return True if lock is owned by current_thread. |
| 330 | # This method is called only if _lock doesn't have _is_owned(). |
| 331 | if self._lock.acquire(False): |
| 332 | self._lock.release() |
| 333 | return False |
| 334 | else: |
| 335 | return True |
| 336 | |
| 337 | def wait(self, timeout=None): |
| 338 | """Wait until notified or until a timeout occurs. |