sync/atomic.Bool.Swap (method)

5 uses

	sync/atomic (current package)
		type.go#L25: func (x *Bool) Swap(new bool) (old bool) { return SwapUint32(&x.v, b32(new)) != 0 }

	github.com/coder/websocket
		close.go#L325: 	return c.closing.Swap(true)

	github.com/gotd/td/telegram
		cdn_pool_manager.go#L44: 	if h.closed.Swap(true) {

	go.opentelemetry.io/otel/trace
		auto.go#L442: 	if s == nil || !s.sampled.Swap(false) {

	go.uber.org/multierr
		error.go#L444: 		if l, ok := left.(*multiError); ok && !l.copyNeeded.Swap(true) {