We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3feeaf9 commit 0b3fc19Copy full SHA for 0b3fc19
model-server/src/main/kotlin/org/modelix/model/server/handlers/LightModelServer.kt
@@ -23,6 +23,7 @@ import io.ktor.websocket.Frame
23
import io.ktor.websocket.readText
24
import io.ktor.websocket.send
25
import kotlinx.coroutines.CoroutineScope
26
+import kotlinx.coroutines.ExperimentalCoroutinesApi
27
import kotlinx.coroutines.channels.Channel
28
import kotlinx.coroutines.launch
29
import kotlinx.coroutines.sync.Mutex
@@ -360,6 +361,7 @@ class LightModelServer(val client: LocalModelClient) {
360
361
}
362
363
364
+@OptIn(ExperimentalCoroutinesApi::class)
365
private suspend fun <T> Channel<T>.receiveLast(): T {
366
var latest = receive()
367
while (!isEmpty) latest = receive()
0 commit comments