mirror of
https://github.com/danbulant/cushy
synced 2026-06-11 10:30:49 +00:00
Closes #97 There was a potential race condition described in #97 that I realized I had seen occasionally when interacting with an element that was currently being animated. These were in complex situations, so I thought I had a situation that could have legitimately caused the warning. However, this warning is preventing a very specific coding "error", and that program did not have it. The existing implementation would potentially prevent one thread's change from invoking its callbacks because another thread was already executing its callbacks. This change moves that state into a Mutex/Condvar pair that allows detecting reentry while allowing other threads to block until its their turn. When it becomes their turn, they can check whether the callbacks were invoked with the current value or not to prevent callbacks from being invoked in quick succeession with the same value by multiple threads. |
||
|---|---|---|
| .. | ||
| animation | ||
| styles | ||
| widgets | ||
| animation.rs | ||
| app.rs | ||
| context.rs | ||
| graphics.rs | ||
| lib.rs | ||
| names.rs | ||
| styles.rs | ||
| tick.rs | ||
| tree.rs | ||
| utils.rs | ||
| value.rs | ||
| widget.rs | ||
| widgets.rs | ||
| window.rs | ||