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
824f4f3c
Kaydet (Commit)
824f4f3c
authored
Eyl 02, 2008
tarafından
Jesse Noller
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Merge r66115 forward to py3k, resolves issue3419
üst
9f76e4f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
managers.py
Lib/multiprocessing/managers.py
+14
-7
No files found.
Lib/multiprocessing/managers.py
Dosyayı görüntüle @
824f4f3c
...
...
@@ -378,7 +378,13 @@ class Server(object):
self
.
id_to_obj
[
ident
]
=
(
obj
,
set
(
exposed
),
method_to_typeid
)
if
ident
not
in
self
.
id_to_refcount
:
self
.
id_to_refcount
[
ident
]
=
None
self
.
id_to_refcount
[
ident
]
=
0
# increment the reference count immediately, to avoid
# this object being garbage collected before a Proxy
# object for it can be created. The caller of create()
# is responsible for doing a decref once the Proxy object
# has been created.
self
.
incref
(
c
,
ident
)
return
ident
,
tuple
(
exposed
)
finally
:
self
.
mutex
.
release
()
...
...
@@ -400,11 +406,7 @@ class Server(object):
def
incref
(
self
,
c
,
ident
):
self
.
mutex
.
acquire
()
try
:
try
:
self
.
id_to_refcount
[
ident
]
+=
1
except
TypeError
:
assert
self
.
id_to_refcount
[
ident
]
is
None
self
.
id_to_refcount
[
ident
]
=
1
self
.
id_to_refcount
[
ident
]
+=
1
finally
:
self
.
mutex
.
release
()
...
...
@@ -641,6 +643,8 @@ class BaseManager(object):
token
,
self
.
_serializer
,
manager
=
self
,
authkey
=
self
.
_authkey
,
exposed
=
exp
)
conn
=
self
.
_Client
(
token
.
address
,
authkey
=
self
.
_authkey
)
dispatch
(
conn
,
None
,
'decref'
,
(
token
.
id
,))
return
proxy
temp
.
__name__
=
typeid
setattr
(
cls
,
typeid
,
temp
)
...
...
@@ -733,10 +737,13 @@ class BaseProxy(object):
elif
kind
==
'#PROXY'
:
exposed
,
token
=
result
proxytype
=
self
.
_manager
.
_registry
[
token
.
typeid
][
-
1
]
return
proxytype
(
proxy
=
proxytype
(
token
,
self
.
_serializer
,
manager
=
self
.
_manager
,
authkey
=
self
.
_authkey
,
exposed
=
exposed
)
conn
=
self
.
_Client
(
token
.
address
,
authkey
=
self
.
_authkey
)
dispatch
(
conn
,
None
,
'decref'
,
(
token
.
id
,))
return
proxy
raise
convert_to_error
(
kind
,
result
)
def
_getvalue
(
self
):
...
...
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