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

FEATURE: defer? #259

Open
noonien opened this issue Jul 10, 2024 · 1 comment
Open

FEATURE: defer? #259

noonien opened this issue Jul 10, 2024 · 1 comment

Comments

@noonien
Copy link

noonien commented Jul 10, 2024

Concurrency examples use a waitgroup, but have to do wg .done at the end of the function. This is not a problem if there are no returns, but once there are multiple returns, the user has to have a wg .done before each return.

Due to how functions are created, I'm guessing implementing defer is not very complicated and would add a lot of value, with IO as well.

@refaktor
Copy link
Owner

Frankly, I haven't taken the time to figure out how defer works internally in Go and if we could use that or "simulate" on our own side. I will check it out, thanks!

@refaktor refaktor changed the title defer? FEATURE: defer? Oct 7, 2024
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

No branches or pull requests

2 participants