 		if case let .alive(snapshot) = state {
 			var observers = snapshot.observers
 			token = observers.insert(observer)
-			state = .alive(SignalStateSnapshot(observers: observers, retaining: self))
+			state = .alive(AliveState(observers: observers, retaining: self))
 		}
 		updateLock.unlock()
 

			//
			//   `updateLock` must be acquired.
			//
			// - Transit from `alive` to `terminating`.
			//
			//   `updateLock` must be acquired.
			//
			// - Extract the snapshot of a terminating signal to deliver the
			//   termination event, and transit from `terminating` to `terminated`.
			//
			//   Both `sendLock` and `updateLock` must be acquired. The state must
			//   also be checked again after the locks are acquired. Fail gracefully

/// The Swift compiler has also an optimization for enums with payloads that are
/// all reference counted, and at most one no-payload case.
private enum SignalState<Value, Error: Swift.Error> {
	/// The `Signal` is alive.
	case alive(AliveState<Value, Error>)

	/// The `Signal` has received a termination event, and is about to be
	/// terminated.
	case terminating(TerminatingState<Value, Error>)

	/// The `Signal` has terminated.
	case terminated
}

// As the amount of state would definitely span over a cache line,
// `AliveState` and `TerminatingState` is set to be a reference type so
// that we can atomically update the reference instead.
//
// Note that in-place mutation should not be introduced to `AliveState` and
// `TerminatingState`. Copy the states and create a new instance.

/// The state of a `Signal` that is alive. It contains a bag of observers and
/// an optional self-retaining reference.
private final class AliveState<Value, Error: Swift.Error> {
	/// The observers of the `Signal`.
	fileprivate let observers: Bag<Signal<Value, Error>.Observer>

