[LL FIR] check for PCE after acquiring the lock for resolve
To the moment we acquire the lock, the computation might not be needed
This commit is contained in:
committed by
Space Team
parent
c80221afd3
commit
de7383ff15
+1
@@ -31,6 +31,7 @@ internal inline fun <T> Lock.lockWithPCECheck(lockingIntervalMs: Long, action: (
|
|||||||
checkCanceled()
|
checkCanceled()
|
||||||
if (tryLock(lockingIntervalMs, TimeUnit.MILLISECONDS)) {
|
if (tryLock(lockingIntervalMs, TimeUnit.MILLISECONDS)) {
|
||||||
try {
|
try {
|
||||||
|
checkCanceled()
|
||||||
needToRun = false
|
needToRun = false
|
||||||
result = action()
|
result = action()
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user