@@ -265,7 +265,7 @@ Each worker's interpreter is isolated from all the other interpreters.
265265"Isolated" means each interpreter has its own runtime state and
266266operates completely independently. For example, if you redirect
267267:data: `sys.stdout ` in one interpreter, it will not be automatically
268- redirected any other interpreter. If you import a module in one
268+ redirected to any other interpreter. If you import a module in one
269269interpreter, it is not automatically imported in any other. You
270270would need to import the module separately in interpreter where
271271you need it. In fact, each module imported in an interpreter is
@@ -287,7 +287,7 @@ efficient alternative is to serialize with :mod:`pickle` and then send
287287the bytes over a shared :mod: `socket <socket> ` or
288288:func: `pipe <os.pipe> `.
289289
290- .. class :: InterpreterPoolExecutor(max_workers=None, thread_name_prefix='', initializer=None, initargs=(), shared=None )
290+ .. class :: InterpreterPoolExecutor(max_workers=None, thread_name_prefix='', initializer=None, initargs=())
291291
292292 A :class: `ThreadPoolExecutor ` subclass that executes calls asynchronously
293293 using a pool of at most *max_workers * threads. Each thread runs
@@ -304,32 +304,17 @@ the bytes over a shared :mod:`socket <socket>` or
304304 and *initargs * using :mod: `pickle ` when sending them to the worker's
305305 interpreter.
306306
307- .. note ::
308- Functions defined in the ``__main__ `` module cannot be pickled
309- and thus cannot be used.
310-
311307 .. note ::
312308 The executor may replace uncaught exceptions from *initializer *
313309 with :class: `~concurrent.futures.interpreter.ExecutionFailed `.
314310
315- The optional *shared * argument is a :class: `dict ` of objects that all
316- interpreters in the pool share. The *shared * items are added to each
317- interpreter's ``__main__ `` module. Not all objects are shareable.
318- Shareable objects include the builtin singletons, :class: `str `
319- and :class: `bytes `, and :class: `memoryview `. See :pep: `734 `
320- for more info.
321-
322311 Other caveats from parent :class: `ThreadPoolExecutor ` apply here.
323312
324313:meth: `~Executor.submit ` and :meth: `~Executor.map ` work like normal,
325314except the worker serializes the callable and arguments using
326315:mod: `pickle ` when sending them to its interpreter. The worker
327316likewise serializes the return value when sending it back.
328317
329- .. note ::
330- Functions defined in the ``__main__ `` module cannot be pickled
331- and thus cannot be used.
332-
333318When a worker's current task raises an uncaught exception, the worker
334319always tries to preserve the exception as-is. If that is successful
335320then it also sets the ``__cause__ `` to a corresponding
0 commit comments