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
working with waitgroup when a app has a synchronisation bug such as deadlock is difficult because there is no way to track the Add's and the Done()'s.
So create a wrapper that enables keeping track of the counter and enable the client to pass in a string that represents the go routine that is invoking it.
Actually, we should define 3 interfaces, one that carries the Add() method, another that takes the Done() method and another for the Wait() method. This way we can be sure that only the appropriate functionality can be invoked by go routines.
The text was updated successfully, but these errors were encountered:
working with waitgroup when a app has a synchronisation bug such as deadlock is difficult because there is no way to track the Add's and the Done()'s.
So create a wrapper that enables keeping track of the counter and enable the client to pass in a string that represents the go routine that is invoking it.
Actually, we should define 3 interfaces, one that carries the Add() method, another that takes the Done() method and another for the Wait() method. This way we can be sure that only the appropriate functionality can be invoked by go routines.
The text was updated successfully, but these errors were encountered: