x/website/_content/doc/tutorial: "Developing a RESTful API with Go and Gin" has unmentioned race condition #51097
Labels
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
This tutorial https://go.dev/doc/tutorial/web-service-gin uses package variable
album
to read and write from http handlers.However there is no synchronization applied to avoid race condition.
If this is intentional to keep the tutorial simple I think it makes sense to warn the reader about code limitations, because high level of concurrency is natural for http servers.
Or maybe it would be even better to avoid race with a different design.
Thanks.
The text was updated successfully, but these errors were encountered: