Created
October 18, 2020 08:04
-
-
Save korchoon/933c27635d9455f5b8f0995b77eee9f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async Routine EnabledDisabledFlow() { | |
while (true) { | |
await Routine.Yield; | |
if (!enabled) | |
await Routine.TryAwait(() => enabled) | |
.Configure(child: DisabledFlow()); | |
await Routine.TryAwait(() => !enabled) | |
.Configure(child: EnabledFlow()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment