 					// Check if the status has been bumped to `terminating` due to a
 					// concurrent or a recursive termination event.
 					//
-					// Note that as the check happens before acquiring `stateLock`, it
+					// Note that as the check happens before acquiring `updateLock`, it
 					// could be a false positive, and thus a second check after the lock
 					// is acquired is mandatory.
 					if case .terminating = signal.state {
-						// Acquire `stateLock`. If the termination has still not yet been
+						// Acquire `updateLock`. If the termination has still not yet been
 						// handled, take it over and bump the status to `terminated`.
-						signal.stateLock.lock()
+						signal.updateLock.lock()
 
 						if case let .terminating(snapshot) = signal.state {
 							signal.state = .terminated
-							signal.stateLock.unlock()
+							signal.updateLock.unlock()
 
 							snapshot.sendTerminated()
 							shouldDispose = true
 						} else {
-							signal.stateLock.unlock()
+							signal.updateLock.unlock()
 						}
 					}
 				}

/// an optional self-retaining reference and an optional associated value.
///
/// As the amount of state would definitely span over a cache line,
/// `SignalStateSnapshot` is set to be a reference type so that we can atomically
/// update the reference instead.
///
/// - warning: In-place mutation should not be introduced to
///            `SignalStateSnapshot`. Copy the states and create a new instance.

	@discardableResult
	public func observe(_ observer: Observer) -> Disposable? {
		var token: RemovalToken?
		updateLock.lock()
		if case let .alive(snapshot) = state {
			var observers = snapshot.observers
			token = observers.insert(observer)
			state = .alive(SignalStateSnapshot(observers: observers, retaining: self))
		}
		updateLock.unlock()

		if let token = token {
			return ActionDisposable { [weak self] in
				if let s = self {
					s.updateLock.lock()
					if case let .alive(snapshot) = s.state {
						var observers = snapshot.observers
						observers.remove(using: token)
						s.state = .alive(SignalStateSnapshot(observers: observers,
						                                     retaining: observers.isEmpty ? nil : self))
					}
					s.updateLock.unlock()
				}
			}
		} else {
