Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
8b48c66e
Kaydet (Commit)
8b48c66e
authored
Şub 25, 2012
tarafından
Sandro Tosi
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #13999: refer to multiprocessing.Queue when needed
üst
f5ea48fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
multiprocessing.rst
Doc/library/multiprocessing.rst
+10
-10
No files found.
Doc/library/multiprocessing.rst
Dosyayı görüntüle @
8b48c66e
...
@@ -107,7 +107,7 @@ processes:
...
@@ -107,7 +107,7 @@ processes:
**Queues**
**Queues**
The :class:`Queue` class is a near clone of :class:`Queue.Queue`. For
The :class:`
~multiprocessing.
Queue` class is a near clone of :class:`Queue.Queue`. For
example::
example::
from multiprocessing import Process, Queue
from multiprocessing import Process, Queue
...
@@ -231,7 +231,7 @@ However, if you really do need to use some shared data then
...
@@ -231,7 +231,7 @@ However, if you really do need to use some shared data then
A manager returned by :func:`Manager` will support types :class:`list`,
A manager returned by :func:`Manager` will support types :class:`list`,
:class:`dict`, :class:`Namespace`, :class:`Lock`, :class:`RLock`,
:class:`dict`, :class:`Namespace`, :class:`Lock`, :class:`RLock`,
:class:`Semaphore`, :class:`BoundedSemaphore`, :class:`Condition`,
:class:`Semaphore`, :class:`BoundedSemaphore`, :class:`Condition`,
:class:`Event`, :class:`Queue`, :class:`Value` and :class:`Array`. For
:class:`Event`, :class:`
~multiprocessing.
Queue`, :class:`Value` and :class:`Array`. For
example, ::
example, ::
from multiprocessing import Process, Manager
from multiprocessing import Process, Manager
...
@@ -464,9 +464,9 @@ primitives like locks.
...
@@ -464,9 +464,9 @@ primitives like locks.
For passing messages one can use :func:`Pipe` (for a connection between two
For passing messages one can use :func:`Pipe` (for a connection between two
processes) or a queue (which allows multiple producers and consumers).
processes) or a queue (which allows multiple producers and consumers).
The :class:`Queue`, :class:`multiprocessing.queues.SimpleQueue` and :class:`JoinableQueue` types are multi-producer,
The :class:`
~multiprocessing.
Queue`, :class:`multiprocessing.queues.SimpleQueue` and :class:`JoinableQueue` types are multi-producer,
multi-consumer FIFO queues modelled on the :class:`Queue.Queue` class in the
multi-consumer FIFO queues modelled on the :class:`Queue.Queue` class in the
standard library. They differ in that :class:`Queue` lacks the
standard library. They differ in that :class:`
~multiprocessing.
Queue` lacks the
:meth:`~Queue.Queue.task_done` and :meth:`~Queue.Queue.join` methods introduced
:meth:`~Queue.Queue.task_done` and :meth:`~Queue.Queue.join` methods introduced
into Python 2.5'
s
:
class
:`
Queue
.
Queue
`
class
.
into Python 2.5'
s
:
class
:`
Queue
.
Queue
`
class
.
...
@@ -489,7 +489,7 @@ Note that one can also create a shared queue by using a manager object -- see
...
@@ -489,7 +489,7 @@ Note that one can also create a shared queue by using a manager object -- see
..
warning
::
..
warning
::
If
a
process
is
killed
using
:
meth
:`
Process
.
terminate
`
or
:
func
:`
os
.
kill
`
If
a
process
is
killed
using
:
meth
:`
Process
.
terminate
`
or
:
func
:`
os
.
kill
`
while
it
is
trying
to
use
a
:
class
:`
Queue
`,
then
the
data
in
the
queue
is
while
it
is
trying
to
use
a
:
class
:`
~
multiprocessing
.
Queue
`,
then
the
data
in
the
queue
is
likely
to
become
corrupted
.
This
may
cause
any
other
process
to
get
an
likely
to
become
corrupted
.
This
may
cause
any
other
process
to
get
an
exception
when
it
tries
to
use
the
queue
later
on
.
exception
when
it
tries
to
use
the
queue
later
on
.
...
@@ -531,7 +531,7 @@ For an example of the usage of queues for interprocess communication see
...
@@ -531,7 +531,7 @@ For an example of the usage of queues for interprocess communication see
The
usual
:
exc
:`
Queue
.
Empty
`
and
:
exc
:`
Queue
.
Full
`
exceptions
from
the
The
usual
:
exc
:`
Queue
.
Empty
`
and
:
exc
:`
Queue
.
Full
`
exceptions
from
the
standard
library
's :mod:`Queue` module are raised to signal timeouts.
standard
library
's :mod:`Queue` module are raised to signal timeouts.
:class:`Queue` implements all the methods of :class:`Queue.Queue` except for
:class:`
~multiprocessing.
Queue` implements all the methods of :class:`Queue.Queue` except for
:meth:`~Queue.Queue.task_done` and :meth:`~Queue.Queue.join`.
:meth:`~Queue.Queue.task_done` and :meth:`~Queue.Queue.join`.
.. method:: qsize()
.. method:: qsize()
...
@@ -582,7 +582,7 @@ For an example of the usage of queues for interprocess communication see
...
@@ -582,7 +582,7 @@ For an example of the usage of queues for interprocess communication see
Equivalent to ``get(False)``.
Equivalent to ``get(False)``.
:class:`multiprocessing.Queue` has a few additional methods not found in
:class:`
~
multiprocessing.Queue` has a few additional methods not found in
:class:`Queue.Queue`. These methods are usually unnecessary for most
:class:`Queue.Queue`. These methods are usually unnecessary for most
code:
code:
...
@@ -612,7 +612,7 @@ For an example of the usage of queues for interprocess communication see
...
@@ -612,7 +612,7 @@ For an example of the usage of queues for interprocess communication see
..
class
::
multiprocessing
.
queues
.
SimpleQueue
()
..
class
::
multiprocessing
.
queues
.
SimpleQueue
()
It
is
a
simplified
:
class
:`
Queue
`
type
,
very
close
to
a
locked
:
class
:`
Pipe
`.
It
is
a
simplified
:
class
:`
~
multiprocessing
.
Queue
`
type
,
very
close
to
a
locked
:
class
:`
Pipe
`.
..
method
::
empty
()
..
method
::
empty
()
...
@@ -629,7 +629,7 @@ For an example of the usage of queues for interprocess communication see
...
@@ -629,7 +629,7 @@ For an example of the usage of queues for interprocess communication see
..
class
::
JoinableQueue
([
maxsize
])
..
class
::
JoinableQueue
([
maxsize
])
:
class
:`
JoinableQueue
`,
a
:
class
:`
Queue
`
subclass
,
is
a
queue
which
:
class
:`
JoinableQueue
`,
a
:
class
:`
~
multiprocessing
.
Queue
`
subclass
,
is
a
queue
which
additionally
has
:
meth
:`
task_done
`
and
:
meth
:`
join
`
methods
.
additionally
has
:
meth
:`
task_done
`
and
:
meth
:`
join
`
methods
.
..
method
::
task_done
()
..
method
::
task_done
()
...
@@ -2084,7 +2084,7 @@ Joining processes that use queues
...
@@ -2084,7 +2084,7 @@ Joining processes that use queues
Bear
in
mind
that
a
process
that
has
put
items
in
a
queue
will
wait
before
Bear
in
mind
that
a
process
that
has
put
items
in
a
queue
will
wait
before
terminating
until
all
the
buffered
items
are
fed
by
the
"feeder"
thread
to
terminating
until
all
the
buffered
items
are
fed
by
the
"feeder"
thread
to
the
underlying
pipe
.
(
The
child
process
can
call
the
the
underlying
pipe
.
(
The
child
process
can
call
the
:
meth
:`
Queue
.
cancel_join_thread
`
method
of
the
queue
to
avoid
this
behaviour
.)
:
meth
:`
~
multiprocessing
.
Queue
.
cancel_join_thread
`
method
of
the
queue
to
avoid
this
behaviour
.)
This
means
that
whenever
you
use
a
queue
you
need
to
make
sure
that
all
This
means
that
whenever
you
use
a
queue
you
need
to
make
sure
that
all
items
which
have
been
put
on
the
queue
will
eventually
be
removed
before
the
items
which
have
been
put
on
the
queue
will
eventually
be
removed
before
the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment