[zeromq-dev] C++ assertion failed with Java client
cremes.devlist at mac.com
Fri Feb 3 06:34:22 CET 2012
On Feb 2, 2012, at 11:21 PM, john skaller wrote:
> On 03/02/2012, at 2:32 PM, Chuck Remes wrote:
>> I can't imagine how it would be done cleanly. I haven't thought about it as deeply as you, but in my experience this will be very difficult if not impossible to achieve. I welcome being proven wrong. :)
> Can you explain why simply setting a mutex at the start of every C API call,
> and releasing it at the end, would not work? the mutex object would
> live in the socket.
I don't understand all the constraints of your Felix language, so anything I guess at would likely be wrong. That said, a single mutex for thousands (tens of thousands, millions?) of Felix threads/fibers would likely not work well. I can't imagine how that would scale to 24, 48, 96+ processors. Like I said earlier: impossible.
>>> Of course I'm not even going to look at the code if there's no demand for
>>> thread safe sockets.
>> I have yet to see anyone in this thread demand it. This lack of demand may yet save you from the work!
> True :) However there's a caveat: people regularly say "I don't need that, I have worked
> without it, why would I need it". They say it because they don't have the alternative
> available to try.
> Why would you need C++? People have been programming successfully in C for
> ages and ages!
> Actually .. no they haven't. They just think they have been, they have no idea
> at all how bad their code is and how inefficient they are by comparison ..
> because they have no comparison.
I agree wholeheartedly. That's why I program in a nice high-level lang like Ruby. I gave up on C & C++ about 15 years ago and have never regretted one instant of it.
>>> I also asked a question earlier that didn't seem to get answered: what is the
>>> attitude introducing a dependence on a foreign library? (Source can be included
>>> in zmq without licence issues). In this case, Judy, since that determines the overhead.
>> I am not a license (or a British licence) expert. I'll defer to others to chime in.
> I'm saying there's no licence issue (I know the developer and he can make
> sure there is no issue and I feel would do so!).
Again, I have no opinion. I'll allow others to voice theirs.
More information about the zeromq-dev