(self)
| 88 | th_lock = TRLock() |
| 89 | |
| 90 | def __init__(self): |
| 91 | # Create global parallelism locks to avoid racing issues with parallel |
| 92 | # bars works only if fork available (Linux/MacOSX, but not Windows) |
| 93 | cls = type(self) |
| 94 | root_lock = cls.th_lock |
| 95 | if root_lock is not None: |
| 96 | root_lock.acquire() |
| 97 | cls.create_mp_lock() |
| 98 | self.locks = [lk for lk in [cls.mp_lock, cls.th_lock] if lk is not None] |
| 99 | if root_lock is not None: |
| 100 | root_lock.release() |
| 101 | |
| 102 | def acquire(self, *a, **k): |
| 103 | for lock in self.locks: |
nothing calls this directly
no test coverage detected