Update BehaviourContextWithFSM.kt
This commit is contained in:
parent
dbe2607994
commit
90ad34f114
|
@ -173,8 +173,10 @@ class DefaultBehaviourContextWithFSM<T : State>(
|
|||
fun Job.enableRemoveOnCompletion(state: T) {
|
||||
invokeOnCompletion {
|
||||
launchSafelyWithoutExceptions {
|
||||
if (this@enableRemoveOnCompletion === statesJobs[state]) {
|
||||
statesJobs.remove(state)
|
||||
statesJobsMutex.withLock {
|
||||
if (this@enableRemoveOnCompletion === statesJobs[state]) {
|
||||
statesJobs.remove(state)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue