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
66e2fb68
Kaydet (Commit)
66e2fb68
authored
Ock 08, 2012
tarafından
Ross Lagerwall
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #12364: Fix a hang in concurrent.futures.ProcessPoolExecutor.
üst
645a0dd6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
process.py
Lib/concurrent/futures/process.py
+1
-6
test_concurrent_futures.py
Lib/test/test_concurrent_futures.py
+6
-0
NEWS
Misc/NEWS
+4
-0
No files found.
Lib/concurrent/futures/process.py
Dosyayı görüntüle @
66e2fb68
...
@@ -213,9 +213,7 @@ def _queue_management_worker(executor_reference,
...
@@ -213,9 +213,7 @@ def _queue_management_worker(executor_reference,
work_item
.
future
.
set_exception
(
result_item
.
exception
)
work_item
.
future
.
set_exception
(
result_item
.
exception
)
else
:
else
:
work_item
.
future
.
set_result
(
result_item
.
result
)
work_item
.
future
.
set_result
(
result_item
.
result
)
continue
# Check whether we should start shutting down.
# If we come here, we either got a timeout or were explicitly woken up.
# In either case, check whether we should start shutting down.
executor
=
executor_reference
()
executor
=
executor_reference
()
# No more work items can be added if:
# No more work items can be added if:
# - The interpreter is shutting down OR
# - The interpreter is shutting down OR
...
@@ -234,9 +232,6 @@ def _queue_management_worker(executor_reference,
...
@@ -234,9 +232,6 @@ def _queue_management_worker(executor_reference,
p
.
join
()
p
.
join
()
call_queue
.
close
()
call_queue
.
close
()
return
return
else
:
# Start shutting down by telling a process it can exit.
shutdown_one_process
()
del
executor
del
executor
_system_limits_checked
=
False
_system_limits_checked
=
False
...
...
Lib/test/test_concurrent_futures.py
Dosyayı görüntüle @
66e2fb68
...
@@ -109,6 +109,12 @@ class ExecutorShutdownTest(unittest.TestCase):
...
@@ -109,6 +109,12 @@ class ExecutorShutdownTest(unittest.TestCase):
self
.
assertFalse
(
err
)
self
.
assertFalse
(
err
)
self
.
assertEqual
(
out
.
strip
(),
b
"apple"
)
self
.
assertEqual
(
out
.
strip
(),
b
"apple"
)
def
test_hang_issue12364
(
self
):
fs
=
[
self
.
executor
.
submit
(
time
.
sleep
,
0.1
)
for
_
in
range
(
50
)]
self
.
executor
.
shutdown
()
for
f
in
fs
:
f
.
result
()
class
ThreadPoolShutdownTest
(
ThreadPoolMixin
,
ExecutorShutdownTest
):
class
ThreadPoolShutdownTest
(
ThreadPoolMixin
,
ExecutorShutdownTest
):
def
_prime_executor
(
self
):
def
_prime_executor
(
self
):
...
...
Misc/NEWS
Dosyayı görüntüle @
66e2fb68
...
@@ -97,6 +97,10 @@ Core and Builtins
...
@@ -97,6 +97,10 @@ Core and Builtins
Library
Library
-------
-------
- Issue #12364: Fix a hang in concurrent.futures.ProcessPoolExecutor.
The hang would occur when retrieving the result of a scheduled future after
the executor had been shut down.
- Issue #13502: threading: Fix a race condition in Event.wait() that made it
- Issue #13502: threading: Fix a race condition in Event.wait() that made it
return False when the event was set and cleared right after.
return False when the event was set and cleared right after.
...
...
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