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
44c19ecc
Kaydet (Commit)
44c19ecc
authored
Eyl 12, 2016
tarafından
Yury Selivanov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #27456: asyncio: Set TCP_NODELAY by default.
üst
a05a6ef1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
selector_events.py
Lib/asyncio/selector_events.py
+16
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/asyncio/selector_events.py
Dosyayı görüntüle @
44c19ecc
...
...
@@ -39,6 +39,17 @@ def _test_selector_event(selector, fd, event):
return
bool
(
key
.
events
&
event
)
if
hasattr
(
socket
,
'TCP_NODELAY'
):
def
_set_nodelay
(
sock
):
if
(
sock
.
family
in
{
socket
.
AF_INET
,
socket
.
AF_INET6
}
and
sock
.
type
==
socket
.
SOCK_STREAM
and
sock
.
proto
==
socket
.
IPPROTO_TCP
):
sock
.
setsockopt
(
socket
.
IPPROTO_TCP
,
socket
.
TCP_NODELAY
,
1
)
else
:
def
_set_nodelay
(
sock
):
pass
class
BaseSelectorEventLoop
(
base_events
.
BaseEventLoop
):
"""Selector event loop.
...
...
@@ -640,6 +651,11 @@ class _SelectorSocketTransport(_SelectorTransport):
self
.
_eof
=
False
self
.
_paused
=
False
# Disable the Nagle algorithm -- small writes will be
# sent without waiting for the TCP ACK. This generally
# decreases the latency (in some cases significantly.)
_set_nodelay
(
self
.
_sock
)
self
.
_loop
.
call_soon
(
self
.
_protocol
.
connection_made
,
self
)
# only start reading when connection_made() has been called
self
.
_loop
.
call_soon
(
self
.
_loop
.
add_reader
,
...
...
Misc/NEWS
Dosyayı görüntüle @
44c19ecc
...
...
@@ -254,6 +254,8 @@ Library
- Issue #21201: Improves readability of multiprocessing error message. Thanks
to Wojciech Walczak for patch.
- Issue #27456: asyncio: Set TCP_NODELAY by default.
IDLE
----
...
...
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