Go Memory Model: How to assign values to a field with proper synchronization
Below is the core portion of my implementation for Promise in Go. // A promise represents the future result of a call to a function. type promise struct { // state is the current state of this promise. state int32 // done is closed when execution completes to unblock concurrent waiters. done chan struct{} //… Read More Go Memory Model: How to assign values to a field with proper synchronization