Skip to content

Commit 0b3fc19

Browse files
committed
chore(model-server): explicitly opt into experimental API usage
1 parent 3feeaf9 commit 0b3fc19

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

model-server/src/main/kotlin/org/modelix/model/server/handlers/LightModelServer.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import io.ktor.websocket.Frame
2323
import io.ktor.websocket.readText
2424
import io.ktor.websocket.send
2525
import kotlinx.coroutines.CoroutineScope
26+
import kotlinx.coroutines.ExperimentalCoroutinesApi
2627
import kotlinx.coroutines.channels.Channel
2728
import kotlinx.coroutines.launch
2829
import kotlinx.coroutines.sync.Mutex
@@ -360,6 +361,7 @@ class LightModelServer(val client: LocalModelClient) {
360361
}
361362
}
362363

364+
@OptIn(ExperimentalCoroutinesApi::class)
363365
private suspend fun <T> Channel<T>.receiveLast(): T {
364366
var latest = receive()
365367
while (!isEmpty) latest = receive()

0 commit comments

Comments
 (0)