1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
use *;
/// A cached `Function` wrapper around `window.queueMicrotask`.
///
/// OPT 7: resolving the `queueMicrotask` JS function used to take a
/// `Reflect::get(&window, &JsValue::from_str("queueMicrotask"))` call
/// (one JS round-trip + a string-to-JsValue conversion) and then a
/// `dyn_into::<Function>` call (another conversion) on every signal
/// update. The resolved handle is now looked up once on first use and
/// cached for the page's lifetime. Subsequent scheduling just
/// `Function::call1(window, dispatch_function)` — one JS round-trip
/// per dispatch instead of three.
pub
/// `Sync` wrapper around `MicrotaskCache` for `thread_local!` storage.
/// SAFETY: only used on the WASM single-threaded runtime.
pub )]
pub ,
);
/// A `Sync` wrapper for single-threaded global `Option<HookContextRc>` access.
///
/// SAFETY: This type is only safe to use in single-threaded contexts
/// (e.g., WASM). It implements `Sync` to allow usage as a `static mut`
/// variable, but concurrent access from multiple threads would be
/// undefined behavior.
pub )]
pub ,
);
/// A zero-sized struct providing static methods for scheduling
/// signal update dispatches and batching.
///
/// All methods are crate-internal associated functions that manage
/// the global scheduling flags and dispatch closure.
pub ;