PluginCoroutineScope
Provides a coroutine scope tied to the plugin lifecycle.
This scope:
Uses Dispatchers.Default for background CPU-bound work
Uses SupervisorJob to prevent child failures from canceling the entire scope
Is properly cancelled when the plugin disables
Usage:
pluginScope.launch {
val result = withTimeout(5000) {
someAsyncOperation()
}
// Handle result...
}Content copied to clipboard