Groovy, thanks alot. On Mon, Dec 8, 2008 at 1:02 PM, Krzysztof B. Wicher <[EMAIL PROTECTED]>wrote:
> Thanks a lot. It is good to know why things work not only make them work. > > krzys > > On Mon, Dec 8, 2008 at 6:25 PM, _why <[EMAIL PROTECTED]> wrote: > >> On Sat, Dec 06, 2008 at 11:27:05PM +0000, Krzysztof B. Wicher wrote: >> > I made it work :) but do not ask me why it works ( >> http://pastie.org/332888) >> > but I came so far that it asked me for a name :) >> >> IO.gets is a blocking operation. The window painting stuff will >> halt because Ruby is waiting for the socket to get some bytes. >> >> The reason it works now is because you placed the IO code in a thread. >> The thread runs in the background and frees up Shoes to do its job. >> For HTTP connections, we have `download` in Shoes, which is >> non-blocking. You can use the EventMachine library to get >> non-blocking plain TCP. >> >> _why >> > > -- --Brains.
