[gambit-list] faster process-status polling.2
Marc Feeley
feeley at iro.umontreal.ca
Mon Jun 12 15:33:34 EDT 2006
On 26-May-06, at 7:39 AM, Christian wrote:
> Hello
>
> I think this patch is better than my first one.
>
Thanks for the suggestion. I've modified it slightly so that polling
is at least done every 0.2 seconds, i.e.:
(let loop ((poll-interval 0.001))
(let ((result (##os-device-process-status (##port-device port))))
(cond ((##not result)
(let ((now (##current-time-point)))
(if (##flonum.< now timeout)
(begin
; 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! poll-interval)
(loop (##flonum.min 0.2 (##flonum.* 1.2 poll-
interval))))
...
It takes 30 polls, with exponentially increasing polling interval
(for a total of 1.18 second), before the maximum is reached.
> 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?
The mailing list daemon was wedged. Things should be back to normal
now.
Marc
More information about the Gambit-list
mailing list