mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
chore: add detekt formatting rule set
https://detekt.dev/docs/next/rules/formatting/
This commit is contained in:
parent
056d4a5829
commit
fe56d257f5
58 changed files with 725 additions and 432 deletions
|
|
@ -2,7 +2,6 @@ package com.geeksville.mesh.concurrent
|
|||
|
||||
import com.geeksville.mesh.android.Logging
|
||||
|
||||
|
||||
/**
|
||||
* A deferred execution object (with various possible implementations)
|
||||
*/
|
||||
|
|
@ -52,15 +51,17 @@ class SyncContinuation<T> : Continuation<T> {
|
|||
while (result == null) {
|
||||
mbox.wait(timeoutMsecs)
|
||||
|
||||
if (timeoutMsecs > 0 && ((System.currentTimeMillis() - startT) >= timeoutMsecs))
|
||||
if (timeoutMsecs > 0 && ((System.currentTimeMillis() - startT) >= timeoutMsecs)) {
|
||||
throw Exception("SyncContinuation timeout")
|
||||
}
|
||||
}
|
||||
|
||||
val r = result
|
||||
if (r != null)
|
||||
if (r != null) {
|
||||
return r.getOrThrow()
|
||||
else
|
||||
} else {
|
||||
throw Exception("This shouldn't happen")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue