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
1c405b3e
Kaydet (Commit)
1c405b3e
authored
Tem 03, 2011
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Followup to 51c1f2cedb96 (and issue #12456):
qsize() raises NotImplementedError on OS X, don't use it.
üst
4334d740
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
process.py
Lib/concurrent/futures/process.py
+10
-10
No files found.
Lib/concurrent/futures/process.py
Dosyayı görüntüle @
1c405b3e
...
@@ -204,7 +204,7 @@ def _queue_management_worker(executor_reference,
...
@@ -204,7 +204,7 @@ def _queue_management_worker(executor_reference,
# This is an upper bound
# This is an upper bound
nb_children_alive
=
sum
(
p
.
is_alive
()
for
p
in
processes
.
values
())
nb_children_alive
=
sum
(
p
.
is_alive
()
for
p
in
processes
.
values
())
for
i
in
range
(
0
,
nb_children_alive
):
for
i
in
range
(
0
,
nb_children_alive
):
call_queue
.
put
(
None
)
call_queue
.
put
_nowait
(
None
)
# If .join() is not called on the created processes then
# If .join() is not called on the created processes then
# some multiprocessing.Queue methods may deadlock on Mac OS X.
# some multiprocessing.Queue methods may deadlock on Mac OS X.
for
p
in
processes
.
values
():
for
p
in
processes
.
values
():
...
@@ -265,18 +265,18 @@ def _queue_management_worker(executor_reference,
...
@@ -265,18 +265,18 @@ def _queue_management_worker(executor_reference,
# - The executor that owns this worker has been collected OR
# - The executor that owns this worker has been collected OR
# - The executor that owns this worker has been shutdown.
# - The executor that owns this worker has been shutdown.
if
shutting_down
():
if
shutting_down
():
# Since no new work items can be added, it is safe to shutdown
# this thread if there are no pending work items.
if
not
pending_work_items
and
call_queue
.
qsize
()
==
0
:
shutdown_worker
()
return
try
:
try
:
# Start shutting down by telling a process it can exit.
# Since no new work items can be added, it is safe to shutdown
call_queue
.
put_nowait
(
None
)
# this thread if there are no pending work items.
if
not
pending_work_items
:
shutdown_worker
()
return
else
:
# Start shutting down by telling a process it can exit.
call_queue
.
put_nowait
(
None
)
except
Full
:
except
Full
:
# This is not a problem: we will eventually be woken up (in
# This is not a problem: we will eventually be woken up (in
# result_queue.get()) and be able to send a sentinel again,
# result_queue.get()) and be able to send a sentinel again.
# if necessary.
pass
pass
executor
=
None
executor
=
None
...
...
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