~ chicken-core (chicken-5) 39ba4406e8633c78969237b45a34856cec60fbf8
commit 39ba4406e8633c78969237b45a34856cec60fbf8
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Mon Nov 15 11:24:36 2010 -0500
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Mon Nov 15 11:24:36 2010 -0500
when scheduler detects thread on fdlist that is not blocked for I/O, then just unblock it and let things be
diff --git a/scheduler.scm b/scheduler.scm
index 90e75e5a..1f8475cc 100644
--- a/scheduler.scm
+++ b/scheduler.scm
@@ -448,8 +448,12 @@ EOF
(dbg t " unblocked by timeout")
(loop2 (cdr threads) keep))
((not (pair? p)) ; not blocked for I/O?
- (panic
- "##sys#unblock-threads-for-i/o: thread on fd-list is not blocked for I/O"))
+ ;; thread on fd-list is not blocked for I/O - this
+ ;; is incorrect but will be ignored, just let it run
+ (when (##sys#slot t 4) ; also blocked for timeout?
+ (##sys#remove-from-timeout-list t))
+ (##sys#thread-basic-unblock! t)
+ (loop2 (cdr threads) keep))
((not (eq? fd (car p)))
(panic
"##sys#unblock-threads-for-i/o: thread on fd-list has wrong FD"))
Trap