When retrieving available serial ports using the Rxtx library (see second example), the close()
method will block, even if the port has been successfully opened.
How do I set a timeout on the close operation so I won't be stuck? Note that these methods are very poorly documented.
Note that I just found this relevant thread. I'll report back soon.
Update -
Here's another thread. Still no luck yet...
来源:https://stackoverflow.com/questions/8926705/how-to-close-rxtx-serial-port