cashapp / zipline

Run Kotlin/JS libraries in Kotlin/JVM and Kotlin/Native programs
Apache License 2.0
2.04k stars 154 forks source link

Add a slow service dispatch detector and callback in event listener #1316

Open JakeWharton opened 4 months ago

JakeWharton commented 4 months ago

Since the JS VM runs on a single thread, doing heavy work in a service dispatch will block other work. This thread should be treated like a main thread, so let's detect slow dispatches and feed them to an event listener for user action.