corda / net.corda.node.utilities / AffinityExecutor / fetchFrom

fetchFrom

open fun <T> fetchFrom(fetcher: () -> T): T

Runs the given function on the executor, blocking until the result is available. Be careful not to deadlock this way! Make sure the executor can't possibly be waiting for the calling thread.