Code polish
This commit is contained in:
parent
1273c8f386
commit
d3c0b4265d
|
@ -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() {
|
||||
|
|
|
@ -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".
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user