From 7982902e38c08cc0e43c2f387235987ed0803e2b Mon Sep 17 00:00:00 2001 From: "rick.parker" Date: Tue, 24 May 2016 16:27:39 +0100 Subject: [PATCH] Added comment about use of Semaphore and CountDownLatch --- node/src/main/kotlin/com/r3corda/node/utilities/FiberBox.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/node/src/main/kotlin/com/r3corda/node/utilities/FiberBox.kt b/node/src/main/kotlin/com/r3corda/node/utilities/FiberBox.kt index f911c864ce..4b712a8fb5 100644 --- a/node/src/main/kotlin/com/r3corda/node/utilities/FiberBox.kt +++ b/node/src/main/kotlin/com/r3corda/node/utilities/FiberBox.kt @@ -32,6 +32,9 @@ import kotlin.concurrent.withLock * to be temporary. In addition, it's enitrely possible to envisage a time when we want public [ProtocolLogic] * implementations to be able to wait for some condition to become true outside of message send/receive. At that point * we may revisit this implementation and indeed the whole model for this, when we understand that requirement more fully. + * + * TODO: We should consider using a [Semaphore] or [CountDownLatch] here to make it a little easier to understand, but it seems + * as though the current version of Qasar does not support suspending on either of their implementations. */ class FiberBox(private val content: T, private val lock: Lock = ReentrantLock()) { private var mutated: SettableFuture? = null