reset

open suspend override fun reset(): Boolean(source)

Resets the store by cancelling all child coroutines and restarting action processing.

Only one reset can execute at a time. If a reset is already in progress, this function returns false immediately without waiting or executing.

All module logic instances will have their ModuleLogic.onStoreReset method called sequentially. Any exceptions thrown during reset will propagate to the caller.

Safe to call from action handlers - uses NonCancellable context to ensure reset completes even if called from within the store's own action processing.

For fire-and-forget usage, use resetAsync instead.

Return

true if reset was executed, false if skipped due to concurrent reset

Throws

if the store is not initialized