On Thu, 30 Jun 2016 12:14:00 -0600
Robert Smiley <yarnoiser...@gmail.com> wrote:
[snip]
> As for the library busy waiting, yes I suppose it does. The procedures
> reader-ready? and writer-ready? use file-select with a timeout of 0
> from the posix unit under the hood. thread-wait-for-i/o! or
> file-select could be used instead of these procedures to allow a
> thread or the entire process to not busy wait.

You can't use file-select for this purpose, because it also will jam
all "threads".  Having a timeout of 0 will avoid that but at the
expense of a busy wait.  You can mitigate that by including
thread-yield! in the busy loop, but the real answer is to use
thread-wait-for-i/o!.  That does what you want.

Chris

_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to