On Tue, 16 Jan 2018 17:44:14 -0500
Yury Selivanov <yselivanov.ml at 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.