MCPcopy Index your code
hub / github.com/python/cpython / main

Method main

Lib/test/test_asyncio/test_events.py:3000–3011  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2998 self.addCleanup(multiprocessing_cleanup_tests)
2999
3000 async def main():
3001 if multiprocessing.get_start_method() == 'fork':
3002 # Avoid 'fork' DeprecationWarning.
3003 mp_context = multiprocessing.get_context('forkserver')
3004 else:
3005 mp_context = None
3006 pool = concurrent.futures.ProcessPoolExecutor(
3007 mp_context=mp_context)
3008 result = await self.loop.run_in_executor(
3009 pool, _test_get_event_loop_new_process__sub_proc)
3010 pool.shutdown()
3011 return result
3012
3013 self.assertEqual(
3014 self.loop.run_until_complete(main()),

Callers

nothing calls this directly

Calls 8

shutdownMethod · 0.95
get_start_methodMethod · 0.45
get_contextMethod · 0.45
run_in_executorMethod · 0.45
new_event_loopMethod · 0.45
run_foreverMethod · 0.45
failMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected