Code polish

This commit is contained in:
nathan 2020-09-03 22:27:20 +02:00
parent 1273c8f386
commit d3c0b4265d
3 changed files with 3 additions and 3 deletions

View File

@ -711,7 +711,7 @@ internal constructor(val type: Class<*>, internal val config: Configuration) : A
*/
fun isRunning(): Boolean {
// if the media driver is running, it will be a quick connection. Usually 100ms or so
return mediaDriverContext?.isDriverActive(1_000, logger::debug) ?: false
return mediaDriverContext.isDriverActive(1_000, logger::debug)
}
final override fun close() {

View File

@ -4,7 +4,7 @@ import kotlinx.coroutines.channels.Channel
// this is bi-directional waiting. The method names to not reflect this, however there is no possibility of race conditions w.r.t. waiting
// https://kotlinlang.org/docs/reference/coroutines/channels.html
class SuspendWaiter(private val channel: Channel<Unit> = Channel()) {
internal data class SuspendWaiter(private val channel: Channel<Unit> = Channel()) {
// "receive' suspends until another coroutine invokes "send"
// and
// "send" suspends until another coroutine invokes "receive".

View File

@ -187,7 +187,7 @@ internal class RmiResponseManager(private val logger: KLogger, private val actio
fun close() {
pendingLock.write {
pending.forEachIndexed { index, any ->
pending.forEachIndexed { index, _ ->
pending[index] = null
}
}