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

Concurrency chapter - example of goroutine loop variables is no longer applicable as of go version 1.22 #740

Open
rqpt opened this issue Feb 24, 2024 · 2 comments

Comments

@rqpt
Copy link

rqpt commented Feb 24, 2024

tldr - This behaviour is something that has been addressed in the latest go release.

I am currently reading this book (excellent btw), and am coding along until I get to the '...and we're back' section of the concurrency chapter.

tdd-go-concurrency-chapter

I ran this example and my tests pass just fine.

tdd-go-concurrency-editor

I then set out to investigate why, as this should fail according to the chapter, and this video cleared things up for me -
https://www.youtube.com/watch?v=Smc-6qfZ2JU

@quii
Copy link
Owner

quii commented Feb 29, 2024

Good spot! Do you fancy making a PR?

@rqpt
Copy link
Author

rqpt commented Feb 29, 2024

I'll give it a shot, sure! I'll try and tackle it this weekend.

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

No branches or pull requests

2 participants