[zeromq-dev] .Net Assert Error: Line 93, locator.cpp
Sean McKay
sean at on-track-solutions.com
Sat May 16 19:09:51 CEST 2009
Hi Martin,
Thank you for the list-- it helped. I also found that I needed to specify
the locator for this to work (simply 127.0.0.1 in this case), or I still
received the locator.cpp line 93 assert error.
Regarding the in-process messaging utility, if you point me to the specific
functions, I can see if adding I can make it work via P/Invoke and if so,
can provide an updated Zmq.cs.
Thanks again,
Sean
-----Original Message-----
From: Martin Sustrik [mailto:sustrik at fastmq.com]
Sent: Friday, May 15, 2009 3:01 AM
To: Sean McKay
Cc: zeromq-dev at mail.imatix.com
Subject: Re: [zeromq-dev] .Net Assert Error: Line 93, locator.cpp
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