Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class FollowingThread extends Thread {
- private Thread previous;
- public void setPrevious(Thread t) {
- previous = t;
- }
- protected void followPrevious() {
- if (previous != null) {
- try {
- previous.join();
- } catch (InterruptedException ignore) {
- }
- }
- previous = null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement