Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. int _countDown= 6;
  2. object _lock;
  3. void ReadyMessageReceivedForTheFirstTimeFromAConnection() {
  4. lock(_lock) {
  5. --_countDown; //
  6. if (_countDown==0) Start();
  7. }
  8. }
  9.  
  10. (let [latch (CountDownLatch. 6)]
  11. (on-receive-message this (fn [_] (.countDown latch)))
  12. (.await latch)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement