spirit-code / spirit

Atomistic Spin Simulation Framework
http://spirit-code.github.io
MIT License
117 stars 52 forks source link

FIFO mutex #558

Closed GPMueller closed 3 years ago

GPMueller commented 4 years ago

Switch from std::mutex to custom Ordered_Lock, which is a kind of "fair" or "fifo" mutex. Closes #436.

Note: implemented according to https://stackoverflow.com/a/14792685/4069571

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 79.329% when pulling 884a3cfba6a83ea642af0a853fb73a5aa36df890 on feature-fifo-mutex into 8f89c90328fd986d09adb5552ee56e26c1078e30 on develop.

codecov[bot] commented 4 years ago

Codecov Report

Merging #558 into develop will increase coverage by 0.05%. The diff coverage is 63.63%.

@@             Coverage Diff             @@
##           develop     #558      +/-   ##
===========================================
+ Coverage    50.06%   50.12%   +0.05%     
===========================================
  Files           88       89       +1     
  Lines        10136    10144       +8     
===========================================
+ Hits          5075     5085      +10     
+ Misses        5061     5059       -2
GPMueller commented 3 years ago

Note: there was a bug in this FIFO lock implementation, which has been fixed with fba2fb515af9ddc3de083bc1fbf422abedd5e4bc.