问题标签 [rim-4.2]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
305 浏览

multithreading - 杀死非等待线程

我需要在我的应用程序中杀死特定的工作线程。我无法控制它的执行,这意味着我不能采用经典的信号布尔变量方法。该线程是非等待的。它不会休眠或等待某个监视器发出信号 - 我无法通过 Thread.interrupt 中断它,这会引发 IllegalThreadState 异常。有任何想法吗?