[zeromq-dev] libzmq.dll => zmq.dll ?
Martin Sustrik
sustrik at 250bpm.com
Wed Feb 24 14:45:14 CET 2010
gonzalo diethelm wrote:
>> Any further issues you are aware of?
>
> Any "singleton" thing has the same types of issues that you have in the
> face of multiple threads. The case for errno is a good example: each
> thread must have a separate value for it and, unfortunately, so does
> each runtime.
>
> I also remember issues with dynamic loading / unloading of DLLs. If the
> DLL creates a singleton instance of anything, you might end up with
> multiple instances of that thing, due to interactions with the runtime.
>
> This is all kind of murky right now, I have not dealt with it (thank
> God) for a long time... Looks like it's time to get back on that bus.
> Sorry I can't be more specific.
We've deliberately avoided any global objects exactly because of this
problem.
Btw, that's why you do:
void *ctx = zmq_init ();
...
zmq_term (ctx);
Instead of:
zmq_init ();
...
zmq_term ();
There may be problems though with embedded OpenPGM library (and glib it
depends on) which does use global variables.
Martin
More information about the zeromq-dev
mailing list