Skip to content

Commit e65c236

Browse files
committed
fix multiprocessing references
1 parent dd87800 commit e65c236

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Doc/whatsnew/2.6.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,11 @@ The :mod:`multiprocessing` module started out as an exact emulation of
568568
the :mod:`threading` module using processes instead of threads. That
569569
goal was discarded along the path to Python 2.6, but the general
570570
approach of the module is still similar. The fundamental class
571-
is the :class:`Process`, which is passed a callable object and
572-
a collection of arguments. The :meth:`start` method
571+
is the :class:`~multiprocessing.Process`, which is passed a callable object and
572+
a collection of arguments. The :meth:`~multiprocessing.Process.start` method
573573
sets the callable running in a subprocess, after which you can call
574-
the :meth:`is_alive` method to check whether the subprocess is still running
575-
and the :meth:`join` method to wait for the process to exit.
574+
the :meth:`~multiprocessing.Process.is_alive` method to check whether the subprocess is still running
575+
and the :meth:`~multiprocessing.Process.join` method to wait for the process to exit.
576576

577577
Here's a simple example where the subprocess will calculate a
578578
factorial. The function doing the calculation is written strangely so
@@ -619,12 +619,12 @@ the object to communicate. (If the parent were to change the value of
619619
the global variable, the child's value would be unaffected, and vice
620620
versa.)
621621

622-
Two other classes, :class:`Pool` and :class:`Manager`, provide
623-
higher-level interfaces. :class:`Pool` will create a fixed number of
622+
Two other classes, :class:`~multiprocessing.pool.Pool` and :class:`~multiprocessing.Manager`, provide
623+
higher-level interfaces. :class:`~multiprocessing.pool.Pool` will create a fixed number of
624624
worker processes, and requests can then be distributed to the workers
625-
by calling :meth:`apply` or :meth:`apply_async` to add a single request,
626-
and :meth:`map` or :meth:`map_async` to add a number of
627-
requests. The following code uses a :class:`Pool` to spread requests
625+
by calling :meth:`~multiprocessing.pool.Pool.apply` or :meth:`~multiprocessing.pool.Pool.apply_async` to add a single request,
626+
and :meth:`map` or :meth:`~multiprocessing.pool.Pool.map_async` to add a number of
627+
requests. The following code uses a :class:`~multiprocessing.pool.Pool` to spread requests
628628
across 5 worker processes and retrieve a list of results::
629629

630630
from multiprocessing import Pool
@@ -646,15 +646,15 @@ This produces the following output::
646646
33452526613163807108170062053440751665152000000000
647647
...
648648

649-
The other high-level interface, the :class:`Manager` class, creates a
649+
The other high-level interface, the :class:`~multiprocessing.Manager` class, creates a
650650
separate server process that can hold master copies of Python data
651651
structures. Other processes can then access and modify these data
652652
structures using proxy objects. The following example creates a
653653
shared dictionary by calling the :meth:`dict` method; the worker
654654
processes then insert values into the dictionary. (Locking is not
655655
done for you automatically, which doesn't matter in this example.
656-
:class:`Manager`'s methods also include :meth:`Lock`, :meth:`RLock`,
657-
and :meth:`Semaphore` to create shared locks.)
656+
:class:`~multiprocessing.Manager`'s methods also include :meth:`~multiprocessing.managers.SyncManager.Lock`, :meth:`~multiprocessing.managers.SyncManager.RLock`,
657+
and :meth:`~multiprocessing.managers.SyncManager.Semaphore` to create shared locks.)
658658

659659
::
660660

0 commit comments

Comments
 (0)