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)
[email protected]



_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to