[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: multithread.lua - file from book PiL 5.1
- From: "Edgardo C." <edxxgardo@...>
- Date: Wed, 5 Sep 2012 14:28:22 +0200
Hi everybody,
I just started to learn this very nice language. Even though I checked around, I did not find any that can solve my problem.
I took the file in the subject from the Lua web site:
http://www.inf.puc-rio.br/~roberto/book/code/multithread.lua.html
Then I run it on Windows 7 and Ubuntu and it looks like (even though using the debugger I see the count variable increasing), the socket connection gets not closed on both OS. The application get locked in the line:
socket.select(connections), meaning that the coroutine is still "doing stuff", which is not true because the file was downloaded.
Note: I changed from "luasocket" to "socket" and the "timeout" to "settimeout" in require.
Any help will be appreciated.
Thanks