(self)
| 284 | self._lock.acquire() # Ignore saved state |
| 285 | |
| 286 | def _is_owned(self): |
| 287 | # Return True if lock is owned by current_thread. |
| 288 | # This method is called only if _lock doesn't have _is_owned(). |
| 289 | if self._lock.acquire(False): |
| 290 | self._lock.release() |
| 291 | return False |
| 292 | else: |
| 293 | return True |
| 294 | |
| 295 | def wait(self, timeout=None): |
| 296 | """Wait until notified or until a timeout occurs. |