[zeromq-dev] .Net Assert Error: Line 93, locator.cpp

Martin Sustrik sustrik at fastmq.com
Fri May 15 10:00:51 CEST 2009


Hi Sean,

> I have attempted to create two Zmq within the same application but on 
> different threads in .Net, and when I attempt to send, from one thread 
> to another, I consistently get problems with the assert at line 93.

What you should do is:

1. Main thread: Create a global exchange.
2. Main thread: Create a global queue.
3. Main thread: Start the child thread.
4. Child thread: Create a local exchange.
5. Child thread: Create a local queue.
6. Child thread: Bind local exchange to the global queue.
7. Child thread: Bind local queue to the global exchange.

At this point you should be able to pass messages between the threads.

> The reason I’m not trying to use the same Zmq for both threads is that I 
> don’t wish to fish the overhead on the mutex/sync locks I would need to use.

0MQ core has very fast in-process messaging ability that avoids usage of 
synchronisation primitives altogether. Unfortunately, .NET wrapper 
doesn't expose this functionality. You may want to modify the wrapper to 
make it available for .NET programs.

Martin




More information about the zeromq-dev mailing list