Combine Two Flags To Gate

Turn several independent condition flows into one on/off gate with `combine` + `distinctUntilChanged` + `collectLatest`, make both the start and the teardown branch idempotent, and run teardown uncancellably. Use when a subsystem starts before it is fully configured, keeps running after one of its preconditions is withdrawn, or ends up half-started after a fast toggle.

maxrave-dev f1b9ff6 6.0 KB Updated

File contents

maxrave-dev/kotlin-footguns/tree/main/skills/combine-two-flags-to-gate commit f1b9ff642e

Frequently asked questions

npx skillmds@latest add maxrave-dev/combine-two-flags-to-gate