Guest User

Untitled

a guest
Dec 12th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. synchronized(monitor) {
  2.  
  3. [...]
  4.  
  5. try {
  6.  
  7. [...]
  8.  
  9. Thread.sleep(config.getWaitTime()); // return 50
  10. } catch (SomeException e) {
  11. log.error(e.getMessage(), e);
  12. }
  13.  
  14. [...]
  15. }
  16.  
  17. try {
  18.  
  19. [..]
  20.  
  21. monitor.wait(config.getWaitTime());
  22. } catch (SomeException e) {
  23. log.error(e.getMessage(), e);
  24. }
  25.  
  26. boolean wait = true;
  27. while (wait) {
  28. wait = false;
  29. monitor.wait(config.getWaitTime());
  30. }
Add Comment
Please, Sign In to add comment