cushy/src
Jonathan Johnson 4959296e07
Fixed callback invocation from multiple threads
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.
2023-12-19 11:41:21 -08:00
..
animation LayoutContext 2023-11-05 11:50:59 -08:00
styles Squashed some todos 2023-12-14 17:30:40 -08:00
widgets Widget docs + refactoring 2023-12-17 07:38:31 -08:00
animation.rs Added Opacity component 2023-12-13 14:02:39 -08:00
app.rs Added Copy to Clipboard to theme editor 2023-12-03 07:38:56 -08:00
context.rs Widget docs + refactoring 2023-12-17 07:38:31 -08:00
graphics.rs Added Opacity component 2023-12-13 14:02:39 -08:00
lib.rs Widget docs + refactoring 2023-12-17 07:38:31 -08:00
names.rs Added Widget::summarize 2023-12-03 06:40:19 -08:00
styles.rs Fixing style inheritance 2023-12-13 12:51:43 -08:00
tick.rs Finished font support 2023-12-10 07:19:32 -08:00
tree.rs Widget docs + refactoring 2023-12-17 07:38:31 -08:00
utils.rs Fixing compilation on Windows 2023-12-18 17:10:04 -08:00
value.rs Fixed callback invocation from multiple threads 2023-12-19 11:41:21 -08:00
widget.rs Widget docs + refactoring 2023-12-17 07:38:31 -08:00
widgets.rs ColorSource picker 2023-12-15 14:01:31 -08:00
window.rs Fixing compilation on Windows 2023-12-18 17:10:04 -08:00