[gambit-list] faster process-status polling.2
Christian
christian at pflanze.mine.nu
Fri May 26 07:39:00 EDT 2006
Hello
I think this patch is better than my first one.
Thanks
Christian.
BTW I'm not getting any mail from the list anymore since May 14th. I'm
seeing that my mails are making it to the list archive, though. Is it
a fault on my end?
--- gambc40b17/lib/_io.scm~ 2006-01-08 21:38:12.000000000 +0100
+++ gambc40b17/lib/_io.scm 2006-05-26 13:32:01.000000000 +0200
@@ -5225,7 +5225,7 @@
(if (##eq? absrel-timeout (macro-absent-obj))
#f
absrel-timeout)))))
- (let loop ()
+ (let loop ((sleeptime 0.001))
(let ((result (##os-device-process-status (##port-device port))))
(cond ((##not result)
(let ((now (##current-time-point)))
@@ -5234,8 +5234,8 @@
; Polling is evil but fixing this would require
; substantial changes to the I/O subsystem. We'll
; tackle that in a future release.
- (##thread-sleep! 0.2)
- (loop))
+ (##thread-sleep! sleeptime)
+ (loop (* 1.2 sleeptime)))
(if (##eq? timeout-val (macro-absent-obj))
(##raise-unterminated-process-exception
process-status
More information about the Gambit-list
mailing list