Boost C++ Libraries: Ticket #13051: Do the spin lock respect priority? https://svn.boost.org/trac10/ticket/13051 <p> suppose one thread 'th1' try to lock to a resource and after that another thread 'th2' try to lock the same resource. if I use pthread_spin_lock is possible that th2 take lock to resource before th1. Boost::spin_lock solve this behavour? if I use Boost::spin_lock priority is respected? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13051 Trac 1.4.3 Andrey Semashev Sun, 25 Jun 2017 13:35:01 GMT status changed; cc, resolution set https://svn.boost.org/trac10/ticket/13051#comment:1 https://svn.boost.org/trac10/ticket/13051#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">Andrey.Semashev@…</span> added </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> There is no spin_lock implementation in Boost.Atomic. There are probably spin lock implementations in other libraries, but I don't think any of them is public. You'll have to specify what particular implementation you are interested in. </p> <p> In general though, spin locks tend to provide no guarantees about fairness or priority support. You typically have to use special mutex types that provide these guarantees. </p> Ticket