-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
context.Context #668
Labels
Comments
Odinhttps://odin-lang.org/docs/faq/#context-system TODO research |
Implicit Approach Every component implicitly has :ctx context.Context inport. User is not allowed to add inport with such name explicitly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Go we pass
ctx context.Context
argument explicitly. We solve 2 problems this wayHere we only talk about first problem - cancelation. How to cancel (terminate) execution before it naturally ends? E.g. by timeout.
On Go Way
I see a downside of Go's solution. Extra
ctx
argument is a boilerplate and once it appears somewhere it can spreads throwout the call-stack.Are there better solutions? What other languages offer?
The text was updated successfully, but these errors were encountered: