[zeromq-dev] Syncronising / isolating zsys layer between dlls

Stephen Gray riskybizlive at live.com
Thu Jan 18 13:09:53 CET 2018


I've got two dlls;  origin.dll & client.dll, both use the CZMQ api are running on the same Windows computer as my custom extensions to a proprietary app.

I'm having issues with the scoping of zsys.  I think there is one instance of zsys layer serving both dlls.  But my understanding of how zsys layer works is hazy.

Inside each dll at runtime are multiple instances of a class using the CZMQ api.  I call zsys_init() on instantiation of the first class then I keep count of the instances as they come and go.  When the count goes to zero I call zsys_shutdown().  This causes an issue when, for example, client.dll is shutting down but origin.dll is still running.  The client shuts down the zsys layer which pulls the rug from under origin.dll then everything gets untidy, inelegant and crashes.

Is there a way to give each dll a dedicated zsys layer?  Or a way to synchronise the shutdown? Or some other way to solve the problem?

This is the final issue in getting my scheme to function!  So close......

Thanks,

Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20180118/47aaa88b/attachment.htm>


More information about the zeromq-dev mailing list