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
1c4b892d
Kaydet (Commit)
1c4b892d
authored
Ara 12, 2013
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add a sequence diagram for the chained coroutines example
üst
f06247d1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
asyncio-task.rst
Doc/library/asyncio-task.rst
+10
-1
tulip_coro.dia
Doc/library/tulip_coro.dia
+0
-0
tulip_coro.png
Doc/library/tulip_coro.png
+0
-0
No files found.
Doc/library/asyncio-task.rst
Dosyayı görüntüle @
1c4b892d
...
...
@@ -74,7 +74,6 @@ Print ``"Hello World"`` every two seconds using a coroutine::
loop = asyncio.get_event_loop()
loop.run_until_complete(greet_every_two_seconds())
.. seealso::
:ref:`Hello World example using a callback <asyncio-hello-world-callback>`.
...
...
@@ -104,6 +103,16 @@ Example chaining coroutines::
``compute()`` is chained to ``print_sum()``: ``print_sum()`` coroutine waits
until ``compute()`` is completed before returing its result.
Sequence diagram of the example:
.. image:: tulip_coro.png
:align: center
The diagram shows the logical links between the task and the two coroutines, it
does not describe exactly how things work internally. For example, the sleep
coroutine creates an internal future which uses
:meth:`BaseEventLoop.call_later` to wake up the task in 1 second.
InvalidStateError
-----------------
...
...
Doc/library/tulip_coro.dia
0 → 100644
Dosyayı görüntüle @
1c4b892d
File added
Doc/library/tulip_coro.png
0 → 100644
Dosyayı görüntüle @
1c4b892d
This diff was suppressed by a .gitattributes entry.
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