Skip to content

Commit d597d48

Browse files
committed
Add name to coroutine
1 parent fafcd3e commit d597d48

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/LiveSession.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import io.ktor.client.plugins.websocket.DefaultClientWebSocketSession
3333
import io.ktor.websocket.Frame
3434
import io.ktor.websocket.close
3535
import io.ktor.websocket.readBytes
36+
import kotlinx.coroutines.CoroutineName
3637
import java.util.concurrent.ConcurrentLinkedQueue
3738
import java.util.concurrent.atomic.AtomicBoolean
3839
import kotlin.coroutines.CoroutineContext
@@ -137,8 +138,8 @@ internal constructor(
137138
)
138139
return@catchAsync
139140
}
140-
141-
scope = CoroutineScope(blockingDispatcher + childJob())
141+
// TODO: maybe it should be THREAD_PRIORITY_AUDIO anyways for playback and recording (not network though)
142+
scope = CoroutineScope(blockingDispatcher + childJob() + CoroutineName("LiveSession Scope"))
142143
audioHelper = AudioHelper.build()
143144

144145
recordUserAudio()

0 commit comments

Comments
 (0)