| LEFT | RIGHT |
| 1 # | 1 # |
| 2 # Module providing various facilities to other parts of the package | 2 # Module providing various facilities to other parts of the package |
| 3 # | 3 # |
| 4 # multiprocessing/util.py | 4 # multiprocessing/util.py |
| 5 # | 5 # |
| 6 # Copyright (c) 2006-2008, R Oudkerk | 6 # Copyright (c) 2006-2008, R Oudkerk |
| 7 # Licensed to PSF under a Contributor Agreement. | 7 # Licensed to PSF under a Contributor Agreement. |
| 8 # | 8 # |
| 9 | 9 |
| 10 import functools | 10 import functools |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 self._lock = threading.Lock() | 288 self._lock = threading.Lock() |
| 289 self.acquire = self._lock.acquire | 289 self.acquire = self._lock.acquire |
| 290 self.release = self._lock.release | 290 self.release = self._lock.release |
| 291 register_after_fork(self, ForkAwareThreadLock.__init__) | 291 register_after_fork(self, ForkAwareThreadLock.__init__) |
| 292 | 292 |
| 293 class ForkAwareLocal(threading.local): | 293 class ForkAwareLocal(threading.local): |
| 294 def __init__(self): | 294 def __init__(self): |
| 295 register_after_fork(self, lambda obj : obj.__dict__.clear()) | 295 register_after_fork(self, lambda obj : obj.__dict__.clear()) |
| 296 def __reduce__(self): | 296 def __reduce__(self): |
| 297 return type(self), () | 297 return type(self), () |
| LEFT | RIGHT |