FileDocCategorySizeDatePackage
PortCloser.javaAPI DocExample593Sun Mar 28 19:09:36 BST 1999None

PortCloser

public class PortCloser extends Thread

Fields Summary
CommPort
thePort
Thread
join1
Thread
join2
Constructors Summary
public PortCloser(CommPort port, Thread t1, Thread t2)

    this.thePort = port;
    join1 = t1;
    join2 = t2;
  
Methods Summary
public voidrun()

  
    try {
      join1.join();
      join2.join();
      // execution stops until both these thread finish
    }
    catch (InterruptedException e) {
    }
   
  
    try {
      thePort.close();  
    }
    catch (Exception e) {
      // the port's probably already been closed
    }