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
3a8ae5f9
Kaydet (Commit)
3a8ae5f9
authored
Ock 11, 2011
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean-up threading.Barrier example.
üst
5cee47f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
3.2.rst
Doc/whatsnew/3.2.rst
+7
-4
No files found.
Doc/whatsnew/3.2.rst
Dosyayı görüntüle @
3a8ae5f9
...
@@ -846,7 +846,7 @@ Example of using barriers::
...
@@ -846,7 +846,7 @@ Example of using barriers::
summarize(ballots)
summarize(ballots)
all_polls_closed = Barrier(len(sites))
all_polls_closed = Barrier(len(sites))
for site in sites
(get_votes(site))
:
for site in sites:
Thread(target=get_votes, args=(site,)).start()
Thread(target=get_votes, args=(site,)).start()
In this example, the barrier enforces a rule that votes cannot be counted at any
In this example, the barrier enforces a rule that votes cannot be counted at any
...
@@ -856,10 +856,13 @@ and continue to do work (summarizing ballots) after the barrier point is
...
@@ -856,10 +856,13 @@ and continue to do work (summarizing ballots) after the barrier point is
crossed.
crossed.
See `Barrier Synchronization Patterns
See `Barrier Synchronization Patterns
<http://parlab.eecs.berkeley.edu/wiki/_media/patterns/paraplop_g1_3.pdf>`_
<http://parlab.eecs.berkeley.edu/wiki/_media/patterns/paraplop_g1_3.pdf>`_ for
for more examples of how barriers can be used in parallel computing.
more examples of how barriers can be used in parallel computing. Also, there is
a simple but thorough explanation of barriers in `The Little Book of Semaphores
<http://greenteapress.com/semaphores/downey08semaphores.pdf>`_, *section 3.6*.
(Contributed by Kristján Valur Jónsson in :issue:`8777`.)
(Contributed by Kristján Valur Jónsson with an API review by Jeffrey Yasskin in
:issue:`8777`.)
datetime
datetime
--------
--------
...
...
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