The code used an atomic bool to guard channel writes. However, this failed to synchronize with the call to close(), causing a panic. Fix the race condition by using a mutex to guard the update to the bool `stopped` and subsequent channel writes. This ensures atomic execution of both updates to `stopped` and channel writes, preventing races between writes and close(). Signed-off-by: horus <horus.li@gmail.com> |
||
|---|---|---|
| .. | ||
| api | ||
| compose | ||
| e2e | ||
| mocks | ||
| progress | ||
| prompt | ||
| remote | ||
| utils | ||
| watch | ||