Message180386
It appears that Linux's "spurious readiness notifications" are a deliberate deviation from the POSIX standard. (They are mentioned in the BUGS section of the man page for select.)
Should I just apply the following patch to the default branch?
diff -r 3ef7f1fe286c tulip/events_test.py
--- a/tulip/events_test.py Mon Jan 21 18:55:29 2013 -0800
+++ b/tulip/events_test.py Tue Jan 22 12:09:21 2013 +0000
@@ -200,7 +200,12 @@
r, w = unix_events.socketpair()
bytes_read = []
def reader():
- data = r.recv(1024)
+ try:
+ data = r.recv(1024)
+ except BlockingIOError:
+ # Spurious readiness notifications are possible
+ # at least on Linux -- see man select.
+ return
if data:
bytes_read.append(data)
else:
@@ -218,7 +223,12 @@
r, w = unix_events.socketpair()
bytes_read = []
def reader():
- data = r.recv(1024)
+ try:
+ data = r.recv(1024)
+ except BlockingIOError:
+ # Spurious readiness notifications are possible
+ # at least on Linux -- see man select.
+ return
if data:
bytes_read.append(data)
else: |
|
Date |
User |
Action |
Args |
2013-01-22 13:31:10 | sbt | set | recipients:
+ sbt, gvanrossum, jcea, pitrou, giampaolo.rodola, trent, neologix |
2013-01-22 13:31:10 | sbt | set | messageid: <1358861470.65.0.64670252928.issue16507@psf.upfronthosting.co.za> |
2013-01-22 13:31:10 | sbt | link | issue16507 messages |
2013-01-22 13:31:10 | sbt | create | |
|