Closed kauefraga closed 2 months ago
When the load balancer handle many requests (concurrent/parallel), all executions write and read from the same source. Use goroutines and sync.Mutex to lock algorithm data while it's being used and unlock when the algorithm finish.
sync.Mutex
Reference: Go mutex
94a05f7 closes this
When the load balancer handle many requests (concurrent/parallel), all executions write and read from the same source. Use goroutines and
sync.Mutex
to lock algorithm data while it's being used and unlock when the algorithm finish.Reference: Go mutex