User Tools

Site Tools


c:c_threads:troubleshooting:deadlocks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
c:c_threads:troubleshooting:deadlocks [2021/06/07 08:55] – created peterc:c_threads:troubleshooting:deadlocks [2021/06/07 08:56] (current) peter
Line 7: Line 7:
 Let's see an example: Let's see an example:
  
-|Thread 1|Thread 2|+^Thread 1^Thread 2^
 |Lock A|Lock B| |Lock A|Lock B|
 |.. Do some processing|..do some processing| |.. Do some processing|..do some processing|
Line 89: Line 89:
 std::scoped_lock lock{muA, muB}; std::scoped_lock lock{muA, muB};
 </code> </code>
-    - You can use a timed mutex where you can mandate that a lock be released after a timeout if it is not already available.+    - You can use a [[https://en.cppreference.com/w/cpp/thread/timed_mutex|timed mutex]] where you can mandate that a lock be released after a timeout if it is not already available.
  
 </WRAP> </WRAP>
  
 +----
 +
 +===== References =====
 +
 +https://en.cppreference.com/w/cpp/thread/timed_mutex
c/c_threads/troubleshooting/deadlocks.1623056109.txt.gz · Last modified: 2021/06/07 08:55 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki