e8a1334288
dynatos-reactive-sync now requires send_guard feature of parking_lot.
2024-12-28 07:03:45 +00:00
c08b71e14f
AsyncSignal now stores the value inside of an IMut<Option<T>>.
...
This avoids some issues when initializing, and makes it so we can reset the value later.
2024-12-28 05:07:41 +00:00
1c93044e21
Removed unsafe from bench.
2024-12-28 04:53:06 +00:00
f442fa6d83
Fixed safety comment being on the wrong statement.
2024-12-28 04:38:01 +00:00
059295cd67
Merged AsyncSignal's loader waker into InnerLoader.
...
This reduces the number of locks and prevents a timing issue where it was possible for the loader to be updated before the waker registered, making the waiter hang forever.
2024-12-25 19:32:42 +00:00
15c11ea98e
Trigger now allows using it as a waker.
...
`AsyncSignal` now uses `Trigger` as a waker if `sync` is enabled.
2024-12-23 22:31:38 +00:00
b2e3c31b77
Fixed trigger::test::basic test failing due to hash impl.
...
Although most pointers are hashed the same, fat pointers are hashed with their metadata, so when hashing an `Effect<dyn ...>` this could cause problems if the metadata were different.
2024-12-23 19:42:03 +00:00
8ad23fe09a
AsyncSignal now keeps a loader instead of just a future.
...
This allows a nicer interface in relation to stopping / restarting the loading.
2024-12-23 18:53:20 +00:00
d4497e1935
AsyncSignal now keeps track if the it's loading.
2024-12-22 18:52:52 +00:00
33d480aa3e
AsyncSignal now keeps track if the future has been polled.
2024-12-22 18:33:58 +00:00
8b936d8f1d
Fixed AsyncSignal sometimes not triggering when values were loaded.
2024-12-22 18:28:42 +00:00
575dc5be17
Fixed AsyncSignal sometimes polling the future after being finished.
...
`AsyncSignal` and `LoadableSignal` no longer support mutable access.
This change fixes the mentioned bug and allows us to be more efficient by removing locks.
2024-12-22 18:25:13 +00:00
95103a9ad9
Moved suspended support from LoadableSignal to AsyncSignal.
2024-12-22 17:58:40 +00:00
a638ff10f1
Added {AsyncSignal, LoadableSignal}::load.
2024-12-22 17:48:24 +00:00
a12ef68a21
LoadableSignal now allows suspending the loading.
2024-12-22 17:08:18 +00:00
fc1f5b101c
Fixed AsyncSignal not being Send when sync feature was active.
2024-12-22 16:45:34 +00:00
4d193c5465
Moved dynatos-reactive's sync type alises to separate crate.
2024-12-22 16:21:32 +00:00
e9f29e1229
Fixed WithDefault not working for signals that yield &Option<T>.
2024-12-22 15:17:27 +00:00
91b7927e3b
Added Loadable::copied.
2024-12-22 15:11:56 +00:00
bf68d0027b
Fixed signal borrowing with sync features sometimes panicking.
...
The check is good on single-threaded signals, where we know that if the value is borrowed, then it won't get unborrowed until we return, but in multi-threaded signals this is not the case.
2024-12-21 23:12:45 +00:00
b34b29dc14
Added EffectDepsGatherer and Effect::deps_gatherer.
...
This adds a new way to gather dependencies that doesn't depend on callbacks.
2024-12-21 22:41:31 +00:00
04a55a744b
Added Effect::{new_raw, gather_dependencies}.
...
These can be used to manually gather dependencies from a source other than the effect's runner.
This is useful when the runner is a function that simply sets some flag.
2024-12-21 22:24:14 +00:00
9bc9fca2c5
dynatos-reactive now supports Sync + Send, optionally.
2024-12-21 01:23:36 +00:00
ac4dde9a66
Updated zutil to latest version.
2024-12-21 00:54:08 +00:00
e96ff29f2d
Fixed some trigger subscriber information having the wrong location sometimes.
2024-12-20 20:17:50 +00:00
06dabd431e
Trigger::{add, remove}_subscriber are now private.
...
Subscribers must be gathered by `Trigger::gather_subscribers`.
This inverts the responsibility of gathering the effects from the caller to the trigger.
This will allow us to add more effect stacks in the future (such as an async task-local effect stack) without changing as much code.
2024-12-20 20:11:43 +00:00
6150fac6fb
Removed all wasm dependencies from dynatos-loadable.
2024-12-20 02:35:56 +00:00
963809a554
Removed all wasm dependencies from dynatos-util.
2024-12-20 01:39:25 +00:00
04abab3007
Moved all wasm things from dynatos-util to dynatos-html.
2024-12-20 01:37:36 +00:00
c8015d9d04
Removed SegVec.
2024-12-20 01:29:13 +00:00
b7c31b73fb
Fixed typo.
2024-12-20 01:25:37 +00:00
68e8f4763a
Fixed dynatos_html::{html, html_file} panicking with a weird error message due to wrong parsed type.
2024-12-20 01:25:33 +00:00
21c7d6038e
Moved cloned macro to zutil.
2024-12-20 01:18:00 +00:00
d84e2c29c7
Updated all dependencies.
2024-12-20 01:07:47 +00:00
7504ef8bff
Updated to rustc 1.85.0-nightly (a4cb3c831 2024-12-17).
2024-12-20 01:02:02 +00:00
d91af40507
Replaced most untyped quote::quote! with typed syn::parse_quote!.
2024-12-07 02:01:24 +00:00
7e11723f2d
dynatos_html::{html, html_file} no longer uses the string span as the identifier span.
2024-12-07 01:54:15 +00:00
d1f59f4f81
Fixed dynatos_html::{html, html_file} not allowing arguments on their own.
2024-12-06 10:15:25 +00:00
455858bf63
Improved formatting for dynatos_html_macros::Node::from_html.
2024-12-06 09:54:01 +00:00
a6caa9729e
dynatos_html::{html, html_file} now allow @event=event_handler attributes.
...
Added `counter-no-macros` example.
2024-12-06 09:53:57 +00:00
9939564b37
dynatos_html::{html, html_file} now allow expressions inside of text using %{expr}%.
2024-12-06 09:24:01 +00:00
f3d792f544
Improved formatting in counter example.
2024-12-06 08:40:55 +00:00
2e7e29c5eb
Removed useless dynamic attribute in counter example.
2024-12-06 08:38:47 +00:00
b15fe1d602
Fixed dynatos_html::{html, html_file} not allowing multiple attributes.
2024-12-06 08:35:02 +00:00
ecef6804dd
dynatos_html::{html, html_file} now allow specifying element expressions with <:attr>.
2024-12-06 08:30:30 +00:00
dfceb11dbf
Replaced tl with a custom html parser.
2024-12-06 08:21:55 +00:00
6d45814a23
dynatos_html::{html, html_file} now unbox the value if only a single exists.
2024-12-03 07:44:31 +00:00
4626ccebf9
dynatos_html::{html, html_file} now allow specifying attribute expressions with :attr="value" or :attr (shorthand for :attr="attr").
2024-12-03 07:02:12 +00:00
7880485ab9
Re-formatted all files with new rustfmt rules for GATs.
2024-12-03 06:53:39 +00:00
45a7e59a0c
Added better error message when failing to push new history.
2024-12-03 06:53:14 +00:00