I am working with threads. However when I try to start a thread, I get a Exception. In concrete java.lang.IllegalThreadStateException. My code is:
public voi
In fact, the call process is:
From main method: controller.main(usbservice);
In controller object:
@Override
public void main(Object argv) {
if(this.writer == null)
this.writer = new CommandWriting(usbservice);
if(this.reader == null)
this.reader = new CommandReading(usbservice);
reader.readCommand();
}
In object reader is the readCommand method.
Then, it is only called once.