(self)
| 100 | return self._semlock.__exit__(*args) |
| 101 | |
| 102 | def __getstate__(self): |
| 103 | context.assert_spawning(self) |
| 104 | sl = self._semlock |
| 105 | if sys.platform == 'win32': |
| 106 | h = context.get_spawning_popen().duplicate_for_child(sl.handle) |
| 107 | else: |
| 108 | if self._is_fork_ctx: |
| 109 | raise RuntimeError('A SemLock created in a fork context is being ' |
| 110 | 'shared with a process in a spawn context. This is ' |
| 111 | 'not supported. Please use the same context to create ' |
| 112 | 'multiprocessing objects and Process.') |
| 113 | h = sl.handle |
| 114 | return (h, sl.kind, sl.maxvalue, sl.name) |
| 115 | |
| 116 | def __setstate__(self, state): |
| 117 | self._semlock = _multiprocessing.SemLock._rebuild(*state) |
nothing calls this directly
no test coverage detected