That is strange, I've experienced alex's problem too - having to yield a
little to give the REPL some room.

Anyhow, for others who might come across this thread: alex's idea works
great, but you need to be careful with blocking IO on your REPL. If you
don't use parley <http://api.call-cc.org/doc/parley> or something similar,
chances are that your REPL srfi-18-thread will block your
srfi-18-game-thread while it's waiting for IO.

K.


On Wed, Jul 2, 2014 at 9:07 PM, John Cowan <co...@mercury.ccil.org> wrote:

> alex scripsit:
>
> > I had some trouble with this last part at first: the original thread
> > waited several seconds before evaluating my input. I think that the
> > fix was nothing more than calling thread-yield! every loop
> > iteration.
>
> If you are depending on thread-yield! for correctness rather than
> efficiency, you are doing something wrong (but I don't know what).
> SRFI 18 schedulers are not required to be fair in any way.
>
> --
> John Cowan          http://www.ccil.org/~cowan        co...@ccil.org
> He that would foil me must use such weapons as I do, for I have not
> fed my readers with straw, neither will I be confuted with stubble.
>                         --Thomas Vaughan (1650)
>
> _______________________________________________
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to