lxbzmy / java-simple-serial-connector

Automatically exported from code.google.com/p/java-simple-serial-connector
0 stars 0 forks source link

Hardware flowcontrol can stuck the execution without any timeout #54

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1 - Try to set the hardware flowcontrol and connect a software flowcontrol 
device or simply disconnect the serial cable.
2 - Open the port and write something.
3 - The thread lock and it became not interruptable (maybe the driver is 
waiting the CTS signal).

I tried to set up a timeout with a ThreadMonitor (see 
org.apache.commons.io.ThreadMonitor ) but the thread with the writing job is 
not interruptable.

How to avoid this deadlock? I know the flowcontrol must be set correctly, 
however if an user miss the setup he can stuck the application.

Original issue reported on code.google.com by tobiascapin on 19 Nov 2013 at 6:08