cushy/examples
Jonathan Johnson 20ae2b7c72
map_each deadlock prevention
map_each previously was written such that if a chain of mappings fed
each other, a deadlock could occur because while the first one was
mapped, the second callback gets invoked and tries to update the first
value while it's still being held.

This refactor switches from std Mutex to parking_lot, allowing me to
remove a workaround for needing to run drop callbacks in a separate
thread during the drop of a DynamicGuard.

In addition to that change, the lower level `map_generational` calls now
take a DynamicGuard as their parameter. This allows these functions to
drop ownership of the referenced data during the callback.

The map_each implementation takes advantage of this by ensuring that the
guard is dropped before set is invoked, minimizing potential lock overlaps.

With this refactor, some old code of mine with complex validations now works
again.
2024-04-05 16:14:26 -07:00
..
assets Tilemap updates 2023-12-09 08:20:18 -08:00
shared Trying to make Mac CI fail gracefully 2024-01-08 09:17:03 -08:00
animation.rs Source<T> + Destination<T> (breaking) 2024-01-02 09:00:29 -08:00
background-tasks.rs Source<T> + Destination<T> (breaking) 2024-01-02 09:00:29 -08:00
basic-button.rs Added to_ variants for into_ functions 2024-01-02 15:07:06 -08:00
buttonception.rs Source<T> + Destination<T> (breaking) 2024-01-02 09:00:29 -08:00
buttons.rs Source<T> + Destination<T> (breaking) 2024-01-02 09:00:29 -08:00
canvas.rs Directly depending on figures 2023-12-28 09:35:24 -08:00
checkbox.rs Added to_ variants for into_ functions 2024-01-02 15:07:06 -08:00
collapse.rs Added to_ variants for into_ functions 2024-01-02 15:07:06 -08:00
color-pickers.rs Added more color pickers 2024-01-10 13:27:12 -08:00
contacts.rs Children renamed to WidgetList 2024-01-09 13:26:14 -08:00
container-shadow.rs Updated to wgpu 0.19.0 2024-01-18 06:37:29 -08:00
containers.rs Updated to wgpu 0.19.0 2024-01-18 06:37:29 -08:00
counter.rs Added to_ variants for into_ functions 2024-01-02 15:07:06 -08:00
cursor-icon.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
custom-widgets.rs map_each deadlock prevention 2024-04-05 16:14:26 -07:00
debug-window.rs ReadOnly<T>, Owned<T>, IntoSource<T>, more 2024-01-02 14:36:53 -08:00
disclose.rs Root tab order fix, Spacebar widget activiation 2023-12-28 15:48:34 -08:00
dynamic-fonts.rs Dynamic font loading 2024-03-06 16:53:36 -08:00
focus-order.rs Updating dependencies 2024-03-06 09:21:43 -08:00
focus.rs Source<T> + Destination<T> (breaking) 2024-01-02 09:00:29 -08:00
gameui.rs Added to_ variants for into_ functions 2024-01-02 15:07:06 -08:00
image.rs Source<T> + Destination<T> (breaking) 2024-01-02 09:00:29 -08:00
input.rs Directly depending on figures 2023-12-28 09:35:24 -08:00
invalidation-batch.rs Renamed example 2024-01-11 09:49:27 -08:00
layers.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
list.rs Added List widget 2024-01-18 13:29:50 -08:00
login.rs Added to_ variants for into_ functions 2024-01-02 15:07:06 -08:00
manual-tabs.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
multi-window.rs Source<T> + Destination<T> (breaking) 2024-01-02 09:00:29 -08:00
nested-scroll.rs Directly depending on figures 2023-12-28 09:35:24 -08:00
offscreen-apng.rs Trying to make Mac CI fail gracefully 2024-01-08 09:17:03 -08:00
offscreen.rs Trying to make Mac CI fail gracefully 2024-01-08 09:17:03 -08:00
overlays.rs Updated to wgpu 0.19.0 2024-01-18 06:37:29 -08:00
plotters.rs Added optional plotters integration 2024-01-11 20:52:40 -08:00
progress.rs Directly depending on figures 2023-12-28 09:35:24 -08:00
radio.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
scroll.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
select.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
slider.rs ReadOnly<T>, Owned<T>, IntoSource<T>, more 2024-01-02 14:36:53 -08:00
stack-align-test.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
style.rs Directly depending on figures 2023-12-28 09:35:24 -08:00
switcher.rs Source<T> + Destination<T> (breaking) 2024-01-02 09:00:29 -08:00
theme.rs Reinstating weak_clone and non-weak callbacks 2024-01-04 13:56:26 -08:00
tic-tac-toe.rs Added to_ variants for into_ functions 2024-01-02 15:07:06 -08:00
tilemap.rs Added optional plotters integration 2024-01-11 20:52:40 -08:00
typography.rs Renaming crate to Cushy 2023-12-27 19:02:59 -08:00
validation.rs Updating dependencies 2024-03-06 09:21:43 -08:00
window-properties.rs Source<T> + Destination<T> (breaking) 2024-01-02 09:00:29 -08:00
wrap.rs Children renamed to WidgetList 2024-01-09 13:26:14 -08:00