mirror of
https://github.com/corda/corda.git
synced 2024-12-26 16:11:12 +00:00
Merge pull request #445 from corda/aslemmer-fix-added-sm-event
Only emit SM Add events when the flow signals that it started
This commit is contained in:
commit
7c459f3c99
@ -278,6 +278,9 @@ class MultiThreadedStateMachineManager(
|
||||
override fun signalFlowHasStarted(flowId: StateMachineRunId) {
|
||||
concurrentBox.concurrent {
|
||||
startedFutures.remove(flowId)?.set(Unit)
|
||||
flows[flowId]?.let { flow ->
|
||||
changesPublisher.onNext(StateMachineManager.Change.Add(flow.fiber.logic))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -584,7 +587,6 @@ class MultiThreadedStateMachineManager(
|
||||
Fiber.unparkDeserialized(flow.fiber, scheduler)
|
||||
}
|
||||
}
|
||||
changesPublisher.onNext(StateMachineManager.Change.Add(flow.fiber.logic))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -278,6 +278,9 @@ class SingleThreadedStateMachineManager(
|
||||
override fun signalFlowHasStarted(flowId: StateMachineRunId) {
|
||||
mutex.locked {
|
||||
startedFutures.remove(flowId)?.set(Unit)
|
||||
flows[flowId]?.let { flow ->
|
||||
changesPublisher.onNext(StateMachineManager.Change.Add(flow.fiber.logic))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -588,7 +591,6 @@ class SingleThreadedStateMachineManager(
|
||||
Fiber.unparkDeserialized(flow.fiber, scheduler)
|
||||
}
|
||||
}
|
||||
changesPublisher.onNext(StateMachineManager.Change.Add(flow.fiber.logic))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user