chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] All threads are blocking by I/O


From: Peter Bex
Subject: Re: [Chicken-users] All threads are blocking by I/O
Date: Wed, 25 Sep 2013 14:42:34 +0200
User-agent: Mutt/1.4.2.3i

On Wed, Sep 25, 2013 at 05:21:57AM -0700, Pedro Melendez wrote:
> Hi Peter!
> 
> Thank you so much for your response!
> 
> I don't understand then what I am doing wrong, this is what I have so
> far:
> 
> https://github.com/pmelendez/scheme-test-server/blob/master/mini-tcp-server.scm
> 
> Please notice that the code is dirty because it is a work in progress
> and I am kinda stuck.

I tested it out (via csi -s mini-tcp-server.scm) and it kept looping and
when I connected with telnet it started printing "Hola" to my telnet
client.

Is that the correct behaviour?

The code itself looks fine to me, from a quick glance.

> One detail I forgot to mention is that I am testing this on windows.

That's a very important little detail :)  There are still some important
glitches left on Windows, unfortunately.

> Now after your explanation... Is it possible that the behavior is
> platform-specific?

It shouldn't be, but our Windows implementation uses Winsock select(),
which is really Microsoft's own "special" interpretation of POSIX select()
which doesn't work on anything except sockets.  However, this *should*
still work since you're only using tcp ports.

Perhaps you're running it from the REPL?  The standard input for csi is
usually line-buffered, so it's the OS itself which might be blocking the
process while reading from stdin for the next command to run.  This can
be worked around on UNIX by installing the parley egg.  However, I don't
know if this works on Windows, because of the above-mentioned FUBAR
select() implementation.

I hope this helps.

Cheers,
Peter
-- 
http://www.more-magic.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]