• Igor Demin's avatar
    Fix deadlock in FrameLimiter (#211) · 310507d9
    Igor Demin authored
    We run FrameLimiter in another thread in SoftwareRedrawer. So FrameLimiter should be thread-safe. It is not thread safe now.
    
    We can run it from the Swing thread though, but probably it will be used in Compose directly, where can be multiple threads (in Application frame clock, for example)
    
    Deadlock:
    [couroutine 2] onRequest.trySend(Unit)
    [couroutine 1] onRequest.receive()
    [couroutine 1] onResult.getAndSet(CompletableDeferred()).complete(value)
    [couroutine 2] onResult.get().await() // wait
    [couroutine 1] onRequest.receive()  // wait
    310507d9
Name
Last commit
Last update
..
commonMain Loading commit data...
jsMain Loading commit data...
jsTest/kotlin Loading commit data...
jvmMain Loading commit data...
jvmTest Loading commit data...
macosMain/kotlin/org/jetbrains/skiko/redrawer Loading commit data...
nativeMain/kotlin/org/jetbrains Loading commit data...