Removed unnecessary comments

This commit is contained in:
Robinson 2022-06-11 22:35:45 +02:00
parent 95a3b4eb69
commit 542b678531
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C

View File

@ -22,7 +22,7 @@ import kotlinx.coroutines.channels.ClosedSendChannelException
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import mu.KLogger
import java.util.concurrent.locks.ReentrantReadWriteLock
import java.util.concurrent.locks.*
import kotlin.concurrent.read
import kotlin.concurrent.write
@ -172,11 +172,9 @@ internal class ResponseManager(logger: KLogger, actionDispatch: CoroutineScope)
// assign the callback that will be notified when the return message is received
responseRmi.result = function
// this just does a .toUShort().toInt() conversion. This is cleaner than doing it manually
val rmiId = RmiUtils.unpackUnsignedRight(responseRmi.id)
pendingLock.write {
// this just does a .toUShort().toInt() conversion. This is cleaner than doing it manually
pending[rmiId] = responseRmi
}
@ -212,7 +210,7 @@ internal class ResponseManager(logger: KLogger, actionDispatch: CoroutineScope)
* @return the result (can be null) or timeout exception
*/
suspend fun waitForReply(actionDispatch: CoroutineScope, responseWaiter: ResponseWaiter, timeoutMillis: Long, logger: KLogger): Any? {
val rmiId = RmiUtils.unpackUnsignedRight(responseWaiter.id) // this just does a .toUShort().toInt() conversion. This is cleaner than doing it manually
val rmiId = RmiUtils.unpackUnsignedRight(responseWaiter.id)
logger.trace {
"RMI waiting: $rmiId"