Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. public class FollowingThread extends Thread {
  2. private Thread previous;
  3.  
  4. public void setPrevious(Thread t) {
  5. previous = t;
  6. }
  7.  
  8. protected void followPrevious() {
  9. if (previous != null) {
  10. try {
  11. previous.join();
  12. } catch (InterruptedException ignore) {
  13. }
  14. }
  15. previous = null;
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement