package com.sptmobile.link import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ExperimentalCoroutinesApi // [impl->REQ-DEVICE-LINK-IROH] /** * The dedicated dispatcher every blocking [LinkNative] call runs on * (APP-PLAN Q2): JNI calls park a thread on the .so's tokio runtime, so they * get their own bounded IO slice and never touch the main thread. Width 8 * covers the worst realistic burst (a few hosts' RPCs + one follow reader * each) without starving Dispatchers.IO for the rest of the app. */ object LinkIo { @OptIn(ExperimentalCoroutinesApi::class) val dispatcher: CoroutineDispatcher = Dispatchers.IO.limitedParallelism(8) }