Closed Tsyklop closed 7 years ago
Please elaborate I do not understand what you want to do.
@nyholku Now the SerialPortEventListener runs in one thread. I'm doing the Swing application and before I display the window I connect to usb, but because the SerialPortEventListener starts in the same thread, the whole process stops on the SerialPortEventListener and the program does not go any further.
@nyholku for example librarry JSSC run Listener in new Thread and program run success.
Hmm, not sure I still understand the problem. PJC creates an internal thread for each open port and the SerialPortEventListener gets called from that thread, so unless you block inside the SerialPortEventListener event handling everything should be ok. If you need to do Swing stuff from within the SerialPortEventListener you should use swing utilities invoke methods.
I check again. Sorry. my mistake.
Hi.
Can your make run SerialPortEventListener in new thread?
Thanks.