Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
w.pr cannot be used to indicate that the pipe has been closed. Instead, we use an atomic.Bool. The problem with using w.pr is that a write to it in the goroutine launched by writer.open can race with a read on w.pr in Close. Note that it's still possible that w.pr.CloseWithError runs concurrently with w.pr.Close. But this is fine.
- Loading branch information