-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
From 21dfa1330d26737631ac6d149c3992d38871678b Mon Sep 17 00:00:00 2001 | ||
From: "J. Nick Koston" <[email protected]> | ||
Date: Thu, 5 Dec 2024 10:01:10 -0600 | ||
Subject: [PATCH 1/2] Ensure writelines pauses the protocol if needed | ||
|
||
--- | ||
Lib/asyncio/selector_events.py | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py | ||
index f94bf10b422..f1ab9b12d69 100644 | ||
--- a/Lib/asyncio/selector_events.py | ||
+++ b/Lib/asyncio/selector_events.py | ||
@@ -1175,6 +1175,7 @@ def writelines(self, list_of_data): | ||
# If the entire buffer couldn't be written, register a write handler | ||
if self._buffer: | ||
self._loop._add_writer(self._sock_fd, self._write_ready) | ||
+ self._maybe_pause_protocol() | ||
|
||
def can_write_eof(self): | ||
return True | ||
-- | ||
2.39.3 (Apple Git-145) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
From 21dfa1330d26737631ac6d149c3992d38871678b Mon Sep 17 00:00:00 2001 | ||
From: "J. Nick Koston" <[email protected]> | ||
Date: Thu, 5 Dec 2024 10:01:10 -0600 | ||
Subject: [PATCH 1/2] Ensure writelines pauses the protocol if needed | ||
|
||
--- | ||
Lib/asyncio/selector_events.py | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py | ||
index f94bf10b422..f1ab9b12d69 100644 | ||
--- a/Lib/asyncio/selector_events.py | ||
+++ b/Lib/asyncio/selector_events.py | ||
@@ -1175,6 +1175,7 @@ def writelines(self, list_of_data): | ||
# If the entire buffer couldn't be written, register a write handler | ||
if self._buffer: | ||
self._loop._add_writer(self._sock_fd, self._write_ready) | ||
+ self._maybe_pause_protocol() | ||
|
||
def can_write_eof(self): | ||
return True | ||
-- | ||
2.39.3 (Apple Git-145) | ||
|