Skip to content
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

Cancelation Problem #668

Open
emil14 opened this issue Jun 1, 2024 · 2 comments
Open

Cancelation Problem #668

emil14 opened this issue Jun 1, 2024 · 2 comments
Labels

Comments

@emil14
Copy link
Collaborator

emil14 commented Jun 1, 2024

In Go we pass ctx context.Context argument explicitly. We solve 2 problems this way

  1. Cancelation
  2. Passing values without "props drilling"

Here 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?

@emil14 emil14 added the Major label Jun 1, 2024
@emil14
Copy link
Collaborator Author

emil14 commented Jun 1, 2024

Odin

https://odin-lang.org/docs/faq/#context-system

TODO research

@emil14
Copy link
Collaborator Author

emil14 commented Jun 1, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant