Removed RMI debug comments
This commit is contained in:
parent
e621bfb4e3
commit
7fbc86d132
@ -37,7 +37,6 @@ internal data class RmiWaiter(val id: Int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
suspend fun doNotify() {
|
suspend fun doNotify() {
|
||||||
println("notified waiter")
|
|
||||||
try {
|
try {
|
||||||
channel.send(Unit)
|
channel.send(Unit)
|
||||||
} catch (ignored: Exception) {
|
} catch (ignored: Exception) {
|
||||||
@ -45,7 +44,6 @@ internal data class RmiWaiter(val id: Int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
suspend fun doWait() {
|
suspend fun doWait() {
|
||||||
println("waiting waiter")
|
|
||||||
try {
|
try {
|
||||||
channel.receive()
|
channel.receive()
|
||||||
} catch (ignored: Exception) {
|
} catch (ignored: Exception) {
|
||||||
@ -53,7 +51,6 @@ internal data class RmiWaiter(val id: Int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun cancel() {
|
fun cancel() {
|
||||||
println("delay is cancelling suspending coroutine")
|
|
||||||
try {
|
try {
|
||||||
channel.cancel()
|
channel.cancel()
|
||||||
} catch (ignored: Exception) {
|
} catch (ignored: Exception) {
|
||||||
@ -109,8 +106,6 @@ internal class RmiResponseStorage(private val actionDispatch: CoroutineScope) {
|
|||||||
|
|
||||||
val pendingId = RmiUtils.packShorts(objectId, responseId)
|
val pendingId = RmiUtils.packShorts(objectId, responseId)
|
||||||
|
|
||||||
println("pending result received")
|
|
||||||
|
|
||||||
val previous = pendingLock.write { pending.put(pendingId, result) }
|
val previous = pendingLock.write { pending.put(pendingId, result) }
|
||||||
|
|
||||||
// if NULL, since either we don't exist, or it was cancelled
|
// if NULL, since either we don't exist, or it was cancelled
|
||||||
@ -162,8 +157,7 @@ internal class RmiResponseStorage(private val actionDispatch: CoroutineScope) {
|
|||||||
// check if we have a result or not
|
// check if we have a result or not
|
||||||
val maybeResult = pendingLock.read { pending[pendingId] }
|
val maybeResult = pendingLock.read { pending[pendingId] }
|
||||||
if (maybeResult is RmiWaiter) {
|
if (maybeResult is RmiWaiter) {
|
||||||
System.err.println("TIMEOUT $pendingId")
|
maybeResult.cancel()
|
||||||
// maybeResult.cancel()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user