homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients giampaolo.rodola, gvanrossum, jcea, neologix, pitrou, sbt, trent
Date 2013年01月22日.13:31:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1358861470.65.0.64670252928.issue16507@psf.upfronthosting.co.za>
In-reply-to
Content
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:
History
Date User Action Args
2013年01月22日 13:31:10sbtsetrecipients: + sbt, gvanrossum, jcea, pitrou, giampaolo.rodola, trent, neologix
2013年01月22日 13:31:10sbtsetmessageid: <1358861470.65.0.64670252928.issue16507@psf.upfronthosting.co.za>
2013年01月22日 13:31:10sbtlinkissue16507 messages
2013年01月22日 13:31:10sbtcreate

AltStyle によって変換されたページ (->オリジナル) /