[zeromq-dev] Windows and PGM

gonzalo diethelm gdiethelm at dcv.cl
Sun Mar 28 00:16:05 CET 2010


> > Maybe starting with zmq_device call that would do the loop and never
> exit
> > would be the easiest. It's ugly and won't work for python, but at
least
> it
> > would further the issue a bit.
> 
> Yes, this makes sense.  Once it is working, it won't be too difficult
> to put the device event loop into a thread and provide a start/stop
> API.

One thing I am doing now is to add an inproc socket to all of the "real
work" sockets I am using. The separate socket polling thread also polls
for this inproc socket and reads "commands" from it: pause, continue,
stop. I am sending a single char (P, C, S) in each case. This could also
become a standard way of making this loop stop whenever needed.

Note: pause / continue are useful to me because I must read data from a
DB and make sure that data has been read before I start processing
messages. 0MQ's inproc sockets make this thread synchronization easy and
inexpensive.

-- 
Gonzalo Diethelm



----------------------------------------- 
Declaración de confidencialidad: Este Mensaje esta destinado para
el uso de la o las personas o entidades a quien ha sido dirigido y
puede contener información reservada y confidencial que no puede
ser divulgada, difundida, ni aprovechada en forma alguna. El uso no
autorizado de la información contenida en este correo podrá ser
sancionado de conformidad con la ley chilena. 
Si usted ha recibido este correo electrónico por error, le pedimos
eliminarlo junto con los archivos adjuntos y avisar inmediatamente
al remitente, respondiendo este mensaje. 

"Before printing this e-mail think if is really necesary".
Disclosure: This Message is to be used by the individual,
individuals or entities that it is addressed to and may include
private and confidential information that may not be disclosed,
made public nor used in any way at all. Unauthorized use of the
information in this electronic mail message may be subject to the
penalties set forth by Chilean law. 
If you have received this electronic mail message in error, we ask
you to destroy the message and its attached file(s) and to
immediately notify the sender by answering this message. 




More information about the zeromq-dev mailing list