[plt-scheme] Need low-level help: blocking on reading from serial port in Windows

From: YC (yinso.chen at gmail.com)
Date: Fri Oct 23 16:43:14 EDT 2009

On Fri, Oct 23, 2009 at 1:32 PM, Nadeem Abdul Hamid <nadeem at acm.org> wrote:

> On Fri, Oct 23, 2009 at 4:09 PM, Neil Van Dyke <neil at neilvandyke.org>
> wrote:
> > I suggest using "sync" to block until bytes are once again ready to be
> read
> > from the port.
> Tried that; it still hangs most of the time, and when I break the
> execution, it highlights the "sync" or "sync/enable-break"
> expression....

That seems like there are no data available in the port - sync blocks until
there are data - in my previous response to you I was able to use your
original function to read from a string port that has plenty of data.

Are you able to read a single byte from the port? i.e. (read-byte
(bot-in-port a-bot)).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20091023/8c7c3da5/attachment.html>

Posted on the users mailing list.