Skip to content

Comment on In the C++ bag of tricks: scoped locks

Comments

People have already pointed out the specific problems with this approach so I won't repeat them.

It's worth reiterating, though: If you are writing c++ these days and find yourself reaching for a preprocessor macro, I think that's a good sign you should think really carefully about what you are actually trying to do. Chances are really good there is a (much) better way.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.