(self)
| 286 | self.waiters = [] |
| 287 | |
| 288 | def has_deadlock(self): |
| 289 | # To avoid deadlocks for concurrent or re-entrant circular imports, |
| 290 | # look at _blocking_on to see if any threads are blocking |
| 291 | # on getting the import lock for any module for which the import lock |
| 292 | # is held by this thread. |
| 293 | return _has_deadlocked( |
| 294 | # Try to find this thread. |
| 295 | target_id=_thread.get_ident(), |
| 296 | seen_ids=set(), |
| 297 | # Start from the thread that holds the import lock for this |
| 298 | # module. |
| 299 | candidate_ids=[self.owner], |
| 300 | # Use the global "blocking on" state. |
| 301 | blocking_on=_blocking_on, |
| 302 | ) |
| 303 | |
| 304 | def acquire(self): |
| 305 | """ |
no test coverage detected