SHARE
TWEET

Untitled

a guest Dec 6th, 2018 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. flag = 0
  2.  
  3. threadA {
  4.     …
  5.     flag = 1
  6.     cv.notify()
  7. }
  8.  
  9. threadB {
  10.     …
  11.     while flag = 0 {
  12.         cv.wait()
  13.     }
  14.     flag = 0
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top