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:
Konstantin Ritt 2020-02-11 16:02:11 +03:00
parent 3ba1122a02
commit abeee81577

View File

@ -84,8 +84,11 @@ public class QtThread {
m_pendingRunnables.add(new Runnable() {
@Override
public void run() {
runnable.run();
sem.release();
try {
runnable.run();
} finally {
sem.release();
}
}
});
m_qtThread.notify();