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
e9436977
Kaydet (Commit)
e9436977
authored
Kas 02, 2013
tarafından
Richard Oudkerk
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #19478: Make choice of semaphore prefix more flexible.
üst
32dfef81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
process.py
Lib/multiprocessing/process.py
+8
-2
synchronize.py
Lib/multiprocessing/synchronize.py
+2
-2
No files found.
Lib/multiprocessing/process.py
Dosyayı görüntüle @
e9436977
...
...
@@ -301,10 +301,16 @@ class _MainProcess(BaseProcess):
self
.
_parent_pid
=
None
self
.
_popen
=
None
self
.
_config
=
{
'authkey'
:
AuthenticationString
(
os
.
urandom
(
32
)),
'semprefix'
:
'mp'
}
'semprefix'
:
'
/
mp'
}
# Note that some versions of FreeBSD only allow named
# semaphores to have names of up to 14 characters. Therfore
# semaphores to have names of up to 14 characters. Ther
e
fore
# we choose a short prefix.
#
# On MacOSX in a sandbox it may be necessary to use a
# different prefix -- see #19478.
#
# Everything in self._config will be inherited by descendant
# processes.
_current_process
=
_MainProcess
()
...
...
Lib/multiprocessing/synchronize.py
Dosyayı görüntüle @
e9436977
...
...
@@ -115,8 +115,8 @@ class SemLock(object):
@staticmethod
def
_make_name
():
return
'
/
%
s-
%
s'
%
(
process
.
current_process
()
.
_config
[
'semprefix'
],
next
(
SemLock
.
_rand
))
return
'
%
s-
%
s'
%
(
process
.
current_process
()
.
_config
[
'semprefix'
],
next
(
SemLock
.
_rand
))
#
# Semaphore
...
...
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