Skip to content

Allow player + save debounced updates to be handled synchronously - #232

Merged
tudddorrr merged 1 commit into
developfrom
awaitable-debounced-updates
Aug 3, 2026
Merged

Allow player + save debounced updates to be handled synchronously#232
tudddorrr merged 1 commit into
developfrom
awaitable-debounced-updates

Conversation

@tudddorrr

@tudddorrr tudddorrr commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Debounced API base class

  • Introduced TaloDebouncedAPI, a reusable base class for APIs that need debounced batched updates with per-call result tracking, flush support, and queuing of updates that arrive while one is in-flight.

Player and save APIs return update results

  • PlayersAPI and SavesAPI now extend TaloDebouncedAPI instead of managing their own debounce timers. debounce_update() returns a Signal that resolves with a PlayerUpdateResult or SaveUpdateResult, letting callers await the outcome of a specific debounced operation (e.g. to inspect rejected props).
  • New player_updated and save_updated signals notify listeners when debounced updates settle.

Prop mutation methods now return values

  • set_prop, delete_prop, set_prop_array, delete_prop_array, insert_into_prop_array, and remove_from_prop_array on EntityWithProps and Player changed return type from void to Variant, returning a signal/awaiter when an update is queued so callers can chain await on the result.

Graceful flush on quit

  • TaloManager._handle_quit() now flushes pending debounced player and save updates before exiting, preventing data loss from in-flight or queued updates at shutdown.

Debounce timer stop support

  • DebounceTimer gained a stop() override that clears the pending flag, enabling flush_updates() to force-immediate execution of queued work.

@tudddorrr tudddorrr changed the title allow player + save debounced updates to be handled synchronously Allow player + save debounced updates to be handled synchronously Aug 3, 2026
@tudddorrr
tudddorrr force-pushed the awaitable-debounced-updates branch from b31916f to 076ef61 Compare August 3, 2026 21:16
@tudddorrr
tudddorrr force-pushed the awaitable-debounced-updates branch from 076ef61 to 6e14b90 Compare August 3, 2026 21:21
@tudddorrr tudddorrr added the breaking Breaking change label Aug 3, 2026
@tudddorrr
tudddorrr merged commit 2a69ea1 into develop Aug 3, 2026
7 checks passed
@tudddorrr
tudddorrr deleted the awaitable-debounced-updates branch August 3, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant