[zeromq-dev] brain foggy -- need help

Andrew Hume andrew at research.att.com
Wed Oct 30 01:34:41 CET 2013

i'm being bitten by an unexpected race condition and would like advice on how to fix.

i have a central server fed by a client.
the client needs to push a large amount of data to teh server but only exit
when the server is done processing it.
both client and server are running on the same linux box.

because of the volume, the client sends the data via PUSH.
after its done, the client sends a REQ/REP sync message on a seperate socket,
and exits when it gets back the reply.

the server uses zmq_poll to detect traffic, but preferentially services the data socket
(that is, after getting a msg on the data socket, it repolls).

the race condition is, of course, that even when sending significant amounts (MB) of data,
the sync message is received and returned before any data socket msgs are processed.

how would you recommend i fix this?

Andrew Hume
949-707-1964 (VO and best)
732-420-0907 (NJ)
andrew at research.att.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20131029/13f7dd9f/attachment.htm>

More information about the zeromq-dev mailing list