You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A friend of mine is trying to learn Go and took this as an example. Unfortunately, it is a great example of a program that fails to be concurrency-safe.
The access to the clients map can be modified by any new connection in the goroutine spawned by http.Serve while being concurrently read-accessed in the handleMessages goroutine whenever an already established websocket writes data to the server.
The text was updated successfully, but these errors were encountered:
A friend of mine is trying to learn Go and took this as an example. Unfortunately, it is a great example of a program that fails to be concurrency-safe.
The access to the clients map can be modified by any new connection in the goroutine spawned by http.Serve while being concurrently read-accessed in the handleMessages goroutine whenever an already established websocket writes data to the server.
The text was updated successfully, but these errors were encountered: