When shutting down, sometimes the firmata-parser-thread is kept running because it never returns from the call to byteQueue.take(). In my case this causes an application to not stop because a non-daemon thread is still running.
A parserThread.interrupt() in stop() causes the take() to return with an InterruptedException and thus stops the thread correctly.
I also tried to add a unit-test for this, but the whole project is not set up for it, are you interested in a separate PR with a few unit-tests?
When shutting down, sometimes the firmata-parser-thread is kept running because it never returns from the call to byteQueue.take(). In my case this causes an application to not stop because a non-daemon thread is still running.
A parserThread.interrupt() in stop() causes the take() to return with an InterruptedException and thus stops the thread correctly.
I also tried to add a unit-test for this, but the whole project is not set up for it, are you interested in a separate PR with a few unit-tests?