mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 14:19:53 +01:00
Always wait for latch before using background handler.
This commit is contained in:
@@ -39,10 +39,11 @@ class AndroidExecutorImpl implements AndroidExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void startIfNecessary() {
|
private void startIfNecessary() {
|
||||||
if (started.getAndSet(true)) return;
|
if (!started.getAndSet(true)) {
|
||||||
Thread t = new Thread(loop, "AndroidExecutor");
|
Thread t = new Thread(loop, "AndroidExecutor");
|
||||||
t.setDaemon(true);
|
t.setDaemon(true);
|
||||||
t.start();
|
t.start();
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
startLatch.await();
|
startLatch.await();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user