[zeromq-dev] Mixing threaded tbb::flow::graph and ZeroMQ

Brett Viren brett.viren at gmail.com
Fri Dec 13 15:50:40 CET 2019


Hi Bill,

Bill Torpey <wallstprog at gmail.com> writes:

> - In practice, it’s possible to share PUB sockets using mutexes if you’re careful.
> - It is not possible to share SUB sockets, period.  It may appear to work, but at some point you
> will crash.  (This has to do with lack of synchronization between user code and code running in
> background threads).

Thanks!  It's not what I'd hoped to hear but it saves me from going down
dead ends.

Part of my use case is to extract data from the graph so I'm cheered to
hear that mutexed PUB can work.  I think a tbb::flow node with
concurrency=1 should provide the needed guards.

Injecting data into a graph becomes the remaining problem.  Now I have a
nice excuse to learn the draft socket types!

Thanks again,
-Brett.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20191213/e8c3e118/attachment.sig>


More information about the zeromq-dev mailing list