• 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
.github/workflows Loading commit data...
.run Loading commit data...
gradle/wrapper Loading commit data...
samples Loading commit data...
skiko Loading commit data...
.gitignore Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
gradlew Loading commit data...
gradlew.bat Loading commit data...
settings.gradle Loading commit data...