(self)
| 5859 | |
| 5860 | @warnings_helper.ignore_fork_in_thread_deprecation_warnings() |
| 5861 | def test_lock(self): |
| 5862 | r, w = multiprocessing.Pipe(False) |
| 5863 | l = util.ForkAwareThreadLock() |
| 5864 | old_size = len(util._afterfork_registry) |
| 5865 | p = multiprocessing.Process(target=self.child, args=(5, w)) |
| 5866 | p.start() |
| 5867 | w.close() |
| 5868 | new_size = r.recv() |
| 5869 | join_process(p) |
| 5870 | self.assertLessEqual(new_size, old_size) |
| 5871 | |
| 5872 | # |
| 5873 | # Check that non-forked child processes do not inherit unneeded fds/handles |
nothing calls this directly
no test coverage detected