[zeromq-dev] Questions about Coding Style

john skaller skaller at users.sourceforge.net
Sat Feb 11 21:14:50 CET 2012


On 12/02/2012, at 4:37 AM, Chuck Remes wrote:

> I will aggressively merge patches that make 0mq a safer and more "forgiving" library.

No you won't :)

You want a robust check? I can give you 99.9999%.
But you'll pay.

You already griped about the tiny weeny cost of my thread safe
sockets (two tests per call).

You are not going to like a proper check at all ***

You may not even like the patch to fix the stupid typing of sockets,
which is entirely free (0 run time cost).

That will catch most stupid errors, but it will break a lot of code
written in C but compiled with C++.

*** a proper check in a single threaded application is quite cheap.
But for multi-threaded applications, the check requires a lock.

It may be worth "conditional compilation" to put the check in, 
I don't know: the existing check is already reasonable.

--
john skaller
skaller at users.sourceforge.net







More information about the zeromq-dev mailing list