Guest User

Untitled

a guest
Oct 20th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. void do_stuff_in_critical_section()
  2. {
  3. // ... some code BEFORE the critical section ...
  4. with_locks({ mutex1, mutex2 }, [&]
  5. {
  6. // ... some code INSIDE the critical section ...
  7. });
  8. // ... some code AFTER the critical section ...
  9. }
Add Comment
Please, Sign In to add comment