提交 5b1120f2 编写于 作者: K kevinw

6968933: Clip loop() deadlock in DirectAudioDevice$DirectClip.run

Reviewed-by: amenkov
上级 797f2cae
...@@ -1393,8 +1393,11 @@ class DirectAudioDevice extends AbstractMixer { ...@@ -1393,8 +1393,11 @@ class DirectAudioDevice extends AbstractMixer {
public void run() { public void run() {
if (Printer.trace) Printer.trace(">>> DirectClip: run() threadID="+Thread.currentThread().getId()); if (Printer.trace) Printer.trace(">>> DirectClip: run() threadID="+Thread.currentThread().getId());
while (thread != null) { while (thread != null) {
if (!doIO) { // doIO is volatile, but we could check it, then get
// pre-empted while another thread changes doIO and notifies,
// before we wait (so we sleep in wait forever).
synchronized(lock) { synchronized(lock) {
if (!doIO) {
try { try {
lock.wait(); lock.wait();
} catch(InterruptedException ie) {} } catch(InterruptedException ie) {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册