Android: release semaphore when the pending runnable causes an exception
Change-Id: Ide727dd5ceb987bdd4a093e6ee4f9c6b980f5ded Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
parent
3ba1122a02
commit
abeee81577
@ -84,9 +84,12 @@ public class QtThread {
|
|||||||
m_pendingRunnables.add(new Runnable() {
|
m_pendingRunnables.add(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
try {
|
||||||
runnable.run();
|
runnable.run();
|
||||||
|
} finally {
|
||||||
sem.release();
|
sem.release();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
m_qtThread.notify();
|
m_qtThread.notify();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user