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
7bdd8d94
Kaydet (Commit)
7bdd8d94
authored
Kas 21, 2009
tarafından
Jesse Noller
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
revert unintended change to multiprocessing/queues.py
üst
6c376744
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
18 deletions
+2
-18
queues.py
Lib/multiprocessing/queues.py
+2
-18
No files found.
Lib/multiprocessing/queues.py
Dosyayı görüntüle @
7bdd8d94
...
@@ -47,8 +47,6 @@ class Queue(object):
...
@@ -47,8 +47,6 @@ class Queue(object):
if
sys
.
platform
!=
'win32'
:
if
sys
.
platform
!=
'win32'
:
register_after_fork
(
self
,
Queue
.
_after_fork
)
register_after_fork
(
self
,
Queue
.
_after_fork
)
self
.
getv
=
0
def
__getstate__
(
self
):
def
__getstate__
(
self
):
assert_spawning
(
self
)
assert_spawning
(
self
)
return
(
self
.
_maxsize
,
self
.
_reader
,
self
.
_writer
,
return
(
self
.
_maxsize
,
self
.
_reader
,
self
.
_writer
,
...
@@ -73,8 +71,6 @@ class Queue(object):
...
@@ -73,8 +71,6 @@ class Queue(object):
self
.
_poll
=
self
.
_reader
.
poll
self
.
_poll
=
self
.
_reader
.
poll
def
put
(
self
,
obj
,
block
=
True
,
timeout
=
None
):
def
put
(
self
,
obj
,
block
=
True
,
timeout
=
None
):
if
not
isinstance
(
obj
,
list
):
debug
(
'put:
%
s'
,
obj
)
assert
not
self
.
_closed
assert
not
self
.
_closed
if
not
self
.
_sem
.
acquire
(
block
,
timeout
):
if
not
self
.
_sem
.
acquire
(
block
,
timeout
):
raise
Full
raise
Full
...
@@ -89,15 +85,11 @@ class Queue(object):
...
@@ -89,15 +85,11 @@ class Queue(object):
self
.
_notempty
.
release
()
self
.
_notempty
.
release
()
def
get
(
self
,
block
=
True
,
timeout
=
None
):
def
get
(
self
,
block
=
True
,
timeout
=
None
):
self
.
getv
+=
1
debug
(
'self.getv:
%
s'
,
self
.
getv
)
if
block
and
timeout
is
None
:
if
block
and
timeout
is
None
:
self
.
_rlock
.
acquire
()
self
.
_rlock
.
acquire
()
try
:
try
:
res
=
self
.
_recv
()
res
=
self
.
_recv
()
self
.
_sem
.
release
()
self
.
_sem
.
release
()
if
not
isinstance
(
res
,
list
):
debug
(
'get:
%
s'
,
res
)
return
res
return
res
finally
:
finally
:
self
.
_rlock
.
release
()
self
.
_rlock
.
release
()
...
@@ -112,8 +104,6 @@ class Queue(object):
...
@@ -112,8 +104,6 @@ class Queue(object):
raise
Empty
raise
Empty
res
=
self
.
_recv
()
res
=
self
.
_recv
()
self
.
_sem
.
release
()
self
.
_sem
.
release
()
if
not
isinstance
(
res
,
list
):
debug
(
'get:
%
s'
,
res
)
return
res
return
res
finally
:
finally
:
self
.
_rlock
.
release
()
self
.
_rlock
.
release
()
...
@@ -239,22 +229,16 @@ class Queue(object):
...
@@ -239,22 +229,16 @@ class Queue(object):
try
:
try
:
while
1
:
while
1
:
obj
=
bpopleft
()
obj
=
bpopleft
()
if
not
isinstance
(
obj
,
list
):
debug
(
'feeder thread got:
%
s'
,
obj
)
if
obj
is
sentinel
:
if
obj
is
sentinel
:
debug
(
'feeder thread got sentinel -- exiting'
)
debug
(
'feeder thread got sentinel -- exiting'
)
close
()
close
()
return
return
if
wacquire
is
None
:
if
wacquire
is
None
:
if
not
isinstance
(
obj
,
list
):
debug
(
'sending to pipe:
%
s'
,
obj
)
send
(
obj
)
send
(
obj
)
else
:
else
:
debug
(
'waiting on wacquire'
)
wacquire
()
wacquire
(
timeout
=
30
)
try
:
try
:
if
not
isinstance
(
obj
,
list
):
debug
(
'sending to pipe:
%
s'
,
obj
)
send
(
obj
)
send
(
obj
)
finally
:
finally
:
wrelease
()
wrelease
()
...
...
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