• 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
..
.run Loading commit data...
buildSrc Loading commit data...
ci Loading commit data...
docker Loading commit data...
gradle/wrapper Loading commit data...
karma.config.d Loading commit data...
src Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
RELEASE.md Loading commit data...
build.gradle.kts Loading commit data...
gradle.properties Loading commit data...
gradlew Loading commit data...
gradlew.bat Loading commit data...
settings.gradle.kts Loading commit data...