mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
Add missing 'Suspendable' annotations to suspending methods (#6480)
This commit is contained in:
parent
d4444e520a
commit
5fef0726a2
@ -73,6 +73,7 @@ internal class ActionExecutorImpl(
|
||||
if (action.uuid != null) services.vaultService.softLockRelease(action.uuid)
|
||||
}
|
||||
|
||||
@Suspendable
|
||||
private fun executeTrackTransaction(fiber: FlowFiber, action: Action.TrackTransaction) {
|
||||
actionFutureExecutor.awaitTransaction(fiber, action)
|
||||
}
|
||||
@ -223,6 +224,7 @@ internal class ActionExecutorImpl(
|
||||
}
|
||||
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
@Suspendable
|
||||
private fun executeAsyncOperation(fiber: FlowFiber, action: Action.ExecuteAsyncOperation) {
|
||||
try {
|
||||
actionFutureExecutor.awaitAsyncOperation(fiber, action)
|
||||
|
@ -1,5 +1,6 @@
|
||||
package net.corda.node.services.statemachine
|
||||
|
||||
import co.paralleluniverse.fibers.Suspendable
|
||||
import net.corda.core.internal.concurrent.thenMatch
|
||||
import net.corda.core.utilities.contextLogger
|
||||
import net.corda.core.utilities.debug
|
||||
@ -45,6 +46,7 @@ internal class ActionFutureExecutor(
|
||||
* @param fiber The [FlowFiber] to resume after completing the async operation
|
||||
* @param action The [Action.ExecuteAsyncOperation] to create a future from
|
||||
*/
|
||||
@Suspendable
|
||||
fun awaitAsyncOperation(fiber: FlowFiber, action: Action.ExecuteAsyncOperation) {
|
||||
cancelFutureIfRunning(fiber, action.currentState)
|
||||
val instance = fiber.instanceId
|
||||
@ -63,6 +65,7 @@ internal class ActionFutureExecutor(
|
||||
* @param fiber The [FlowFiber] to resume after the committing the specified transaction
|
||||
* @param action [Action.TrackTransaction] contains the transaction hash to wait for
|
||||
*/
|
||||
@Suspendable
|
||||
fun awaitTransaction(fiber: FlowFiber, action: Action.TrackTransaction) {
|
||||
cancelFutureIfRunning(fiber, action.currentState)
|
||||
val instance = fiber.instanceId
|
||||
|
Loading…
Reference in New Issue
Block a user