Skip to content

Comments

Use context to safely break out of loops and cancel tickers#7

Merged
masih merged 1 commit intomainfrom
masih/nothing-is-forever
Aug 6, 2025
Merged

Use context to safely break out of loops and cancel tickers#7
masih merged 1 commit intomainfrom
masih/nothing-is-forever

Conversation

@masih
Copy link
Contributor

@masih masih commented Aug 6, 2025

Wherever possible, use context to ensure that the code path cannot enter a forever loop as a result of a developer error. This would have the added benefit in some cases of avoiding an additional iteration when context is done.

Add defer statements to stop tickers as required.

Fix a minor error type check.

Wherever possible, use context to ensure that the code path cannot enter
a forever loop as a result of a developer error. This would have the
added benefit in some cases of avoiding an additional iteration when
context is done.

Add defer statements to stop tickers as required.

Fix a minor error type check.
@masih masih force-pushed the masih/nothing-is-forever branch from c16c036 to 68091f9 Compare August 6, 2025 15:34
@masih masih merged commit b70b2f8 into main Aug 6, 2025
2 checks passed
@masih masih deleted the masih/nothing-is-forever branch August 6, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants