On Tue, 16 Jan 2018 17:44:14 -0500
Yury Selivanov <yselivanov.ml@gmail.com> wrote:
> Offloading execution to other threads
> ------------------------------------- Does it also support offloading to a separate process (using
>
> 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))
ProcessPoolExecutor in the example above)? This would require the
Context to support pickling.