There is no way to recv a message and then timeout if no messages are received in a certain time span. Since killing the process that is calling recv will cause the handle to it to get cleaned up by the library. This PR introduces the unblock behavior which causes the server to clear the pending_recv PID and send it a {error, again} similar to what ZMQ already does here:
There is no way to
recv
a message and then timeout if no messages are received in a certain time span. Since killing the process that is callingrecv
will cause the handle to it to get cleaned up by the library. This PR introduces theunblock
behavior which causes the server to clear thepending_recv
PID and send it a{error, again}
similar to what ZMQ already does here:http://api.zeromq.org/4-1:zmq-setsockopt#toc29
If you think this design is good I can replicate it to all other sockets implementing
chumak_pattern
.