• Home
  • Raw
  • Download

Lines Matching refs:multiprocessing

1 :mod:`multiprocessing` --- Process-based "threading" interface
4 .. module:: multiprocessing
13 :mod:`multiprocessing` is a package that supports spawning processes using an
14 API similar to the :mod:`threading` module. The :mod:`multiprocessing` package
17 to this, the :mod:`multiprocessing` module allows the programmer to fully
21 The :mod:`multiprocessing` module also introduces APIs which do not have
30 from multiprocessing import Pool
47 In :mod:`multiprocessing`, processes are spawned by creating a :class:`Process`
52 from multiprocessing import Process
64 from multiprocessing import Process
85 necessary, see :ref:`multiprocessing-programming`.
91 :mod:`multiprocessing` supports two types of communication channel between
96 The :class:`~multiprocessing.Queue` class is a near clone of :class:`Queue.Queue`. For
99 from multiprocessing import Process, Queue
118 from multiprocessing import Process, Pipe
143 :mod:`multiprocessing` contains equivalents of all the synchronization
147 from multiprocessing import Process, Lock
172 :mod:`multiprocessing` provides a couple of ways of doing so.
179 from multiprocessing import Process, Value, Array
208 :mod:`multiprocessing.sharedctypes` module which supports the creation of
220 :class:`Event`, :class:`~multiprocessing.Queue`, :class:`Value` and :class:`Array`. For
223 from multiprocessing import Process, Manager
258 The :class:`~multiprocessing.pool.Pool` class represents a pool of worker
264 from multiprocessing import Pool, TimeoutError
298 print "We lacked patience and got a multiprocessing.TimeoutError"
306 importable by the children. This is covered in :ref:`multiprocessing-programming`
311 >>> from multiprocessing import Pool
335 The :mod:`multiprocessing` package mostly replicates the API of the
441 When :mod:`multiprocessing` is initialized the main process is assigned a
448 See :ref:`multiprocessing-auth-keys`.
475 >>> import multiprocessing, time, signal
476 >>> p = multiprocessing.Process(target=time.sleep, args=(1000,))
509 The :class:`~multiprocessing.Queue`, :class:`multiprocessing.queues.SimpleQueue` and :class:`Joinab…
511 standard library. They differ in that :class:`~multiprocessing.Queue` lacks the
521 :ref:`multiprocessing-managers`.
525 :mod:`multiprocessing` uses the usual :exc:`Queue.Empty` and
527 the :mod:`multiprocessing` namespace so you need to import them from
537 :ref:`manager <multiprocessing-managers>`.
552 while it is trying to use a :class:`~multiprocessing.Queue`, then the data in the queue is
560 <multiprocessing.Queue.cancel_join_thread>`), then that process will
569 :ref:`multiprocessing-programming`.
572 :ref:`multiprocessing-examples`.
595 :class:`~multiprocessing.Queue` implements all the methods of :class:`Queue.Queue` except for
601 multithreading/multiprocessing semantics, this number is not reliable.
609 multithreading/multiprocessing semantics, this is not reliable.
614 multithreading/multiprocessing semantics, this is not reliable.
645 :class:`~multiprocessing.Queue` has a few additional methods not found in
689 .. class:: multiprocessing.queues.SimpleQueue()
691 It is a simplified :class:`~multiprocessing.Queue` type, very close to a locked :class:`Pipe`.
708 :class:`JoinableQueue`, a :class:`~multiprocessing.Queue` subclass, is a queue which
760 Add support for when a program which uses :mod:`multiprocessing` has been
767 from multiprocessing import Process, freeze_support
797 :mod:`multiprocessing` contains no analogues of
812 :func:`Pipe <multiprocessing.Pipe>` -- see also
813 :ref:`multiprocessing-listeners-clients`.
893 >>> from multiprocessing import Pipe
920 :ref:`multiprocessing-auth-keys`.
932 .. currentmodule:: multiprocessing
939 object -- see :ref:`multiprocessing-managers`.
959 object from :mod:`multiprocessing`.
979 :class:`multiprocessing.Lock` as it applies to either processes or threads,
983 instance of ``multiprocessing.synchronize.Lock`` initialized with a
1031 instance of ``multiprocessing.synchronize.RLock`` initialized with a
1118 :mod:`multiprocessing.synchronize` module will be disabled, and attempts to
1184 The :mod:`multiprocessing.sharedctypes` module
1187 .. module:: multiprocessing.sharedctypes
1190 The :mod:`multiprocessing.sharedctypes` module provides functions for allocating
1241 :class:`~multiprocessing.Lock` or :class:`~multiprocessing.RLock` object
1256 synchronize access to the value. If *lock* is a :class:`~multiprocessing.Lock` or
1257 :class:`~multiprocessing.RLock` object then that will be used to synchronize access to the
1273 :class:`multiprocessing.RLock` object is created automatically.
1300 from multiprocessing import Process, Lock
1301 from multiprocessing.sharedctypes import Value, Array
1354 .. function:: multiprocessing.Manager()
1356 Returns a started :class:`~multiprocessing.managers.SyncManager` object which
1361 .. module:: multiprocessing.managers
1366 :mod:`multiprocessing.managers` module:
1394 >>> from multiprocessing.managers import BaseManager
1405 >>> from multiprocessing.managers import BaseManager
1464 :func:`multiprocessing.Manager`.
1557 >>> manager = multiprocessing.Manager()
1573 from multiprocessing.managers import BaseManager
1603 >>> from multiprocessing.managers import BaseManager
1614 >>> from multiprocessing.managers import BaseManager
1624 >>> from multiprocessing.managers import BaseManager
1636 >>> from multiprocessing import Process, Queue
1637 >>> from multiprocessing.managers import BaseManager
1669 >>> from multiprocessing import Manager
1703 The proxy types in :mod:`multiprocessing` do nothing to support comparisons
1785 .. module:: multiprocessing.pool
1791 .. class:: multiprocessing.Pool([processes[, initializer[, initargs[, maxtasksperchild]]]])
1866 ``next(timeout)`` will raise :exc:`multiprocessing.TimeoutError` if the
1901 :exc:`multiprocessing.TimeoutError` is raised. If the remote call raised
1919 from multiprocessing import Pool
1939 print result.get(timeout=1) # raises multiprocessing.TimeoutError
1947 .. module:: multiprocessing.connection
1951 :class:`Connection` objects returned by :func:`~multiprocessing.Pipe`.
1953 However, the :mod:`multiprocessing.connection` module allows some extra
1983 *address*. (See :ref:`multiprocessing-address-formats`)
1989 :ref:`multiprocessing-auth-keys`.
2012 :ref:`multiprocessing-address-formats`. Note that if *family* is
2030 :exc:`AuthenticationError` is raised. See :ref:`multiprocessing-auth-keys`.
2037 :exc:`~multiprocessing.AuthenticationError` is raised.
2061 The base class of all :mod:`multiprocessing` exceptions.
2083 from multiprocessing.connection import Listener
2104 from multiprocessing.connection import Client
2159 :class:`~multiprocessing.Process`). This value will be automatically inherited by
2160 any :class:`~multiprocessing.Process` object that the current process creates.
2175 .. currentmodule:: multiprocessing
2178 Returns the logger used by :mod:`multiprocessing`. If necessary, a new one
2189 .. currentmodule:: multiprocessing
2199 >>> import multiprocessing, logging
2200 >>> logger = multiprocessing.log_to_stderr()
2204 >>> m = multiprocessing.Manager()
2212 In addition to having these two logging functions, the multiprocessing also
2228 within the multiprocessing module. Below is the same example as above, except
2231 >>> import multiprocessing, logging
2232 >>> logger = multiprocessing.log_to_stderr()
2233 >>> logger.setLevel(multiprocessing.SUBDEBUG)
2236 >>> m = multiprocessing.Manager()
2250 The :mod:`multiprocessing.dummy` module
2253 .. module:: multiprocessing.dummy
2256 :mod:`multiprocessing.dummy` replicates the API of :mod:`multiprocessing` but is
2266 :mod:`multiprocessing`.
2296 :func:`~multiprocessing.active_children` is called) all completed processes
2298 process's :meth:`Process.is_alive <multiprocessing.Process.is_alive>` will
2304 On Windows many types from :mod:`multiprocessing` need to be picklable so
2312 Using the :meth:`Process.terminate <multiprocessing.Process.terminate>`
2319 :meth:`Process.terminate <multiprocessing.Process.terminate>` on processes
2327 :meth:`~multiprocessing.Queue.cancel_join_thread` method of the queue to avoid this behaviour.)
2337 from multiprocessing import Process, Queue
2366 from multiprocessing import Process, Lock
2378 from multiprocessing import Process, Lock
2390 :mod:`multiprocessing` originally unconditionally called::
2394 in the :meth:`multiprocessing.Process._bootstrap` method --- this resulted
2433 Also, if you subclass :class:`~multiprocessing.Process` then make sure that
2435 <multiprocessing.Process.start>` method is called.
2442 <multiprocessing.Process.start>` was called.
2456 from multiprocessing import Process
2467 from multiprocessing import Process, freeze_support
2497 Using :class:`~multiprocessing.pool.Pool`:
2520 Some simple benchmarks comparing :mod:`multiprocessing` with :mod:`threading`: