I believe I have researched answers to similar problems and have not found the answer to my specific issue.
I am using an open source Text-To-Speech software from a third party in Java, and when I cancel and/or interrupt the text to speech message, child threads of the TTS thread are left in a waiting state. Using JConsole, I find messages for each waiting thread like:
Stack trace: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.park(Unknown Source) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) java.util.concurrent.ArrayBlockingQueue.put(Unknown Source)
Is there a way I can interrupt or cancel a thread while safely cascading the stoppage of all other child threads?
I have experimented with an ExecutorService, daemon threads, and synchronous logic.
Please let me know if you have any suggestions. Thanks.