containerd/core
Justin Chadwell b48e1141eb copy: setError should imply Close
If sending two messages from goroutine X:

	a <- 1
	b <- 2

And receiving them in goroutine Y:

	select {
	case <- a:
	case <- b:
	}

Either branch of the select can trigger first - so when we call
.setError and .Close next to each other, we don't know whether the done
channel will close first or the error channel will receive first - so
sometimes, we get an incorrect error message.

We resolve this by not sending both signals - instead, we can have
.setError *imply* .Close, by having the pushWriter call .Close on
itself, after receiving an error.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2024-02-03 10:20:11 +01:00
..
containers Move containers to core/containers 2024-01-17 09:50:40 -08:00
content copy: remove max number of ErrResets 2024-02-03 10:20:10 +01:00
diff Switch to new errdefs package 2024-01-25 22:18:45 -08:00
images Switch to new errdefs package 2024-01-25 22:18:45 -08:00
leases Switch to new errdefs package 2024-01-25 22:18:45 -08:00
metadata Switch to new errdefs package 2024-01-25 22:18:45 -08:00
metrics Switch to new errdefs package 2024-01-25 22:18:45 -08:00
mount mv contrib/seccomp/kernelversion pkg/kernelversion 2024-01-24 19:03:53 +09:00
remotes copy: setError should imply Close 2024-02-03 10:20:11 +01:00
runtime Move Message proto to types 2024-02-02 10:35:23 -08:00
sandbox Switch to new errdefs package 2024-01-25 22:18:45 -08:00
snapshots Switch to new errdefs package 2024-01-25 22:18:45 -08:00