You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a problem when using multiple threads, and to be honest, I'm not sure if this is a bug in the library or Windows being silly. However, I feel like it could be a solvable issue.
The problem is that it seems to be okay to write to a port from different threads as long as all threads stay alive in the lifetime of the connection. If any of the threads die while the port is open, jtermios.windows.JTermiosImpl$Fail is thrown.
I have included a testcase that can reliably reproduce the issue. Simply connect a loopback port (I used an FTDI cable with TX and RX shorted) and run the test. You'll see that if I keep the thread alive, all is fine, but if the thread finishes, the error occurs. ComThreading.java.txt
The text was updated successfully, but these errors were encountered:
I encountered a problem when using multiple threads, and to be honest, I'm not sure if this is a bug in the library or Windows being silly. However, I feel like it could be a solvable issue.
The problem is that it seems to be okay to write to a port from different threads as long as all threads stay alive in the lifetime of the connection. If any of the threads die while the port is open, jtermios.windows.JTermiosImpl$Fail is thrown.
I have included a testcase that can reliably reproduce the issue. Simply connect a loopback port (I used an FTDI cable with TX and RX shorted) and run the test. You'll see that if I keep the thread alive, all is fine, but if the thread finishes, the error occurs.
ComThreading.java.txt
The text was updated successfully, but these errors were encountered: