| 6173 | |
| 6174 | @warnings_helper.ignore_fork_in_thread_deprecation_warnings() |
| 6175 | def test_nested_startmethod(self): |
| 6176 | # gh-108520: Regression test to ensure that child process can send its |
| 6177 | # arguments to another process |
| 6178 | queue = multiprocessing.Queue() |
| 6179 | |
| 6180 | process = multiprocessing.Process(target=self._put_two_and_nest_once, args=(queue,)) |
| 6181 | process.start() |
| 6182 | process.join() |
| 6183 | |
| 6184 | results = [] |
| 6185 | while not queue.empty(): |
| 6186 | results.append(queue.get()) |
| 6187 | |
| 6188 | # gh-109706: queue.put(1) can write into the queue before queue.put(2), |
| 6189 | # there is no synchronization in the test. |
| 6190 | self.assertSetEqual(set(results), set([2, 1])) |
| 6191 | |
| 6192 | |
| 6193 | @unittest.skipIf(sys.platform == "win32", |