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
cd77815e
Kaydet (Commit)
cd77815e
authored
Şub 15, 2012
tarafından
Sandro Tosi
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #11836: document and expose multiprocessing.SimpleQueue
üst
91a87419
5cb522cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
multiprocessing.rst
Doc/library/multiprocessing.rst
+18
-1
__init__.py
Lib/multiprocessing/__init__.py
+8
-1
No files found.
Doc/library/multiprocessing.rst
Dosyayı görüntüle @
cd77815e
...
...
@@ -483,7 +483,7 @@ primitives like locks.
For passing messages one can use :func:`Pipe` (for a connection between two
processes) or a queue (which allows multiple producers and consumers).
The :class:`Queue` and :class:`JoinableQueue` types are multi-producer,
The :class:`Queue`
, :class:`SimpleQueue`
and :class:`JoinableQueue` types are multi-producer,
multi-consumer FIFO queues modelled on the :class:`queue.Queue` class in the
standard library. They differ in that :class:`Queue` lacks the
:meth:`~queue.Queue.task_done` and :meth:`~queue.Queue.join` methods introduced
...
...
@@ -629,6 +629,23 @@ For an example of the usage of queues for interprocess communication see
exits
--
see
:
meth
:`
join_thread
`.
..
class
::
SimpleQueue
()
It
is
a
simplified
:
class
:`
Queue
`
type
,
very
close
to
a
locked
:
class
:`
Pipe
`.
..
method
::
empty
()
Return
``
True
``
if
the
queue
is
empty
,
``
False
``
otherwise
.
..
method
::
get
()
Remove
and
return
an
item
from
the
queue
.
..
method
::
put
(
item
)
Put
*
item
*
into
the
queue
.
..
class
::
JoinableQueue
([
maxsize
])
:
class
:`
JoinableQueue
`,
a
:
class
:`
Queue
`
subclass
,
is
a
queue
which
...
...
Lib/multiprocessing/__init__.py
Dosyayı görüntüle @
cd77815e
...
...
@@ -48,7 +48,7 @@ __all__ = [
'Manager'
,
'Pipe'
,
'cpu_count'
,
'log_to_stderr'
,
'get_logger'
,
'allow_connection_pickling'
,
'BufferTooShort'
,
'TimeoutError'
,
'Lock'
,
'RLock'
,
'Semaphore'
,
'BoundedSemaphore'
,
'Condition'
,
'Event'
,
'Queue'
,
'JoinableQueue'
,
'Pool'
,
'Value'
,
'Array'
,
'Event'
,
'Queue'
,
'
SimpleQueue'
,
'
JoinableQueue'
,
'Pool'
,
'Value'
,
'Array'
,
'RawValue'
,
'RawArray'
,
'SUBDEBUG'
,
'SUBWARNING'
,
]
...
...
@@ -223,6 +223,13 @@ def JoinableQueue(maxsize=0):
from
multiprocessing.queues
import
JoinableQueue
return
JoinableQueue
(
maxsize
)
def
SimpleQueue
():
'''
Returns a queue object
'''
from
multiprocessing.queues
import
SimpleQueue
return
SimpleQueue
()
def
Pool
(
processes
=
None
,
initializer
=
None
,
initargs
=
(),
maxtasksperchild
=
None
):
'''
Returns a process pool object
...
...
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