Ticket #486: no-scheduler-panic-on-wrong-blocking-fd-and-thanks-for-the-bug-report.diff

File no-scheduler-panic-on-wrong-blocking-fd-and-thanks-for-the-bug-report.diff, 863 bytes (added by felix winkelmann, 13 years ago)
  • scheduler.scm

    diff --git a/scheduler.scm b/scheduler.scm
    index 045c348..a3efc67 100644
    a b EOF 
    455455                                            (##sys#remove-from-timeout-list t))
    456456                                          (##sys#thread-basic-unblock! t)
    457457                                          (loop2 (cdr threads) keep))
    458                                          ((not (eq? fd (car p)))
    459                                           (panic
    460                                            "##sys#unblock-threads-for-i/o: thread on fd-list has wrong FD"))
    461                                          ((fdset-test inf outf (cdr p))
     458                                         ((or (not (eq? fd (car p)))
     459                                              ;; thread on fd-list has incorrect
     460                                              ;; file-descriptor registered.
     461                                              ;; We just assume this is the right one and
     462                                              ;; unblock.
     463                                              ;; XXX Needs to be investigated...
     464                                              (fdset-test inf outf (cdr p)))
    462465                                          (when (##sys#slot t 4) ; also blocked for timeout?
    463466                                            (##sys#remove-from-timeout-list t))
    464467                                          (##sys#thread-basic-unblock! t)