| 3006 | pool.join() |
| 3007 | |
| 3008 | def test_resource_warning(self): |
| 3009 | if self.TYPE == 'manager': |
| 3010 | self.skipTest("test not applicable to manager") |
| 3011 | |
| 3012 | pool = self.Pool(1) |
| 3013 | pool.terminate() |
| 3014 | pool.join() |
| 3015 | |
| 3016 | # force state to RUN to emit ResourceWarning in __del__() |
| 3017 | pool._state = multiprocessing.pool.RUN |
| 3018 | |
| 3019 | with warnings_helper.check_warnings( |
| 3020 | ('unclosed running multiprocessing pool', ResourceWarning)): |
| 3021 | pool = None |
| 3022 | support.gc_collect() |
| 3023 | |
| 3024 | def raising(): |
| 3025 | raise KeyError("key") |