[zeromq-dev] is socket.recv interruptable in java ?
Koert Kuipers
Koert.Kuipers at diamondnotch.com
Thu Jan 13 19:48:33 CET 2011
OK. That's what I suspected. I just started using poll with timeout everywhere to avoid a thread becoming unresponsive in a recv() operation.
An interruptable_recv function can be build using the poll and recv functions....
-----Original Message-----
From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Alexey Ermakov
Sent: Thursday, January 13, 2011 1:08 PM
To: ZeroMQ development list
Subject: Re: [zeromq-dev] is socket.recv interruptable in java ?
jzmq doesn't support Thread.interrupt() at all. Supporting it in
Socket.recv() would be impossible (assuming that it remains as close
as possible to zmq_recv), and supporting it in poll() might be doable,
but is going to be quite hard. Your best options are using poll() with
timeouts or using an inproc signalling socket to wakeup the receiving
thread.
On Wed, Jan 12, 2011 at 6:54 PM, Koert Kuipers
<Koert.Kuipers at diamondnotch.com> wrote:
> In the java code I cannot find any indication that recv() is interruptable.
> Also recv does not throw any checked exceptions such as
> InterruptedException. Can anyone provide more info on this for me?
>
> Thanks koert
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
More information about the zeromq-dev
mailing list