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
7067b5d9
Kaydet (Commit)
7067b5d9
authored
Ock 21, 2014
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
selectors: add a comment to explain why and how poll timeout is rounded
üst
781a5441
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
selectors.py
Lib/selectors.py
+4
-2
No files found.
Lib/selectors.py
Dosyayı görüntüle @
7067b5d9
...
@@ -354,10 +354,12 @@ if hasattr(select, 'poll'):
...
@@ -354,10 +354,12 @@ if hasattr(select, 'poll'):
def
select
(
self
,
timeout
=
None
):
def
select
(
self
,
timeout
=
None
):
if
timeout
is
None
:
if
timeout
is
None
:
timeout
=
None
timeout
=
None
elif
timeout
<
0
:
elif
timeout
<
=
0
:
timeout
=
0
timeout
=
0
else
:
else
:
timeout
=
int
(
math
.
ceil
(
timeout
*
1000.0
))
# poll() has a resolution of 1 millisecond, round away from
# zero to wait *at least* timeout seconds.
timeout
=
int
(
math
.
ceil
(
timeout
*
1e3
))
ready
=
[]
ready
=
[]
try
:
try
:
fd_event_list
=
self
.
_poll
.
poll
(
timeout
)
fd_event_list
=
self
.
_poll
.
poll
(
timeout
)
...
...
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