I've been using C++11 for several months, I've been enjoying most components of the C++11 standard library except those of the atomic-operations-related.
In my opinion, lock-free programming is too complicated to get it right, while lock-based programming is intuitive and easy to understand and follow. So, I have to consider the value of lock-free programming.
To fully understand lock-free programming and lock-based programming, I wonder:
What're the pros and cons of lock-free programming and lock-based programming?