On Tue, 16 Jan 2018 17:44:14 -0500 Yury Selivanov <yselivanov...@gmail.com> wrote:
> Offloading execution to other threads > ------------------------------------- > > It is possible to run code in a separate OS thread using a copy > of the current thread context:: > > executor = ThreadPoolExecutor() > current_context = contextvars.copy_context() > > executor.submit( > lambda: current_context.run(some_function)) Does it also support offloading to a separate process (using ProcessPoolExecutor in the example above)? This would require the Context to support pickling. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com