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
I'm very impressed with the work you did on this library. Very neat indeed. I had a question for you... in your implementation of the Promise struct, is there a reason why status doesn't need to be mutex protected?
typePromisestruct {
// Fn represent the underlaying promised functionfnfunc(*Promise, ...interface{})
// Args represents the arguments that needs to be passed when the promise is invokedargs []interface{}
// Not Started: 0// Pending: 1// Finished: 2statusbyte// <---- does this status variable need to be protected by a mutex or rwmutex?wg sync.WaitGroupthenThenHandler// Resultresultinterface{}
// Errorerrerrorbatchbool
}
The text was updated successfully, but these errors were encountered:
Hello,
I'm very impressed with the work you did on this library. Very neat indeed. I had a question for you... in your implementation of the
Promise
struct, is there a reason whystatus
doesn't need to be mutex protected?The text was updated successfully, but these errors were encountered: