[Haskell-cafe] Re: all threads are blocked by recvFrom
Adam Langley
agl at imperialviolet.org
Fri Mar 14 13:13:47 EDT 2008
On Fri, Mar 14, 2008 at 8:51 AM, Vitaliy Akimov
<vitaliy.akimov at gmail.com> wrote:
> > I assume that you're binding the libc function directly here:
>
> I'm using Network.Socket. Sory if it's not clear from my previous posts.
Then everything should Just Work(tm). You might need to paste in code
in order to figure out why this wouldn't be so.
See [1] for an example which works for me. It starts a thread which
prints "working..." once a second and, in another thread, listens for
UDP packets on port 4112. I can use `nc -u 127.0.0.1 4112` to get
this:
"working..."
"working..."
("testing\n",8,127.0.0.1:36179)
"working..."
"working..."
("testing two\n",12,127.0.0.1:36179)
"working..."
[1] http://hpaste.org/6362
--
Adam Langley agl at imperialviolet.org http://www.imperialviolet.org
More information about the Haskell-Cafe
mailing list