 	///   - generator: A closure that accepts an implicitly created observer
 	///                that will act as an event emitter for the signal.
 	public init(_ generator: (Observer) -> Disposable?) {
-		status = .alive(SignalState())
-		statusLock = NSLock()
-		statusLock.name = "org.reactivecocoa.ReactiveSwift.Signal.statusLock"
+		state = .alive(SignalStateSnapshot())
+		stateLock = NSLock()
+		stateLock.name = "org.reactivecocoa.ReactiveSwift.Signal.stateLock"
 		sendLock = NSLock()
 		sendLock.name = "org.reactivecocoa.ReactiveSwift.Signal.sendLock"
 

				// occur while the `sendLock` is acquired, the observer call-out and
				// the disposal would be delegated to the current sender, or
				// occasionally one of the senders waiting on `sendLock`.
				signal.statusLock.lock()

				if case let .alive(state) = signal.status {
					// Updates to `status` are implicitly synchronized against `sendLock`.
					// So we do not need to guard it with an explicit lock.
					//
					// Specifically, senders are serialized by `sendLock`, and can react
					// to and bump the status to `terminated` only after they see the
					// status being `terminating`.
					//
					// `terminating` can happen only once in the lifetime of a `Signal`,
					// since `state` being swapped with `nil` is a point of no return.
					//
					// Even in the case that both a previous sender and its successor see
					// `terminating`, the senders are still bound to the `sendLock`. So
					// whichever sender loses the battle of acquring `sendLock` is
					// guaranteed to see a status of `terminated`, and eventually be
					// blocked.
					signal.status = .terminating(SignalState(observers: state.observers,
					                                         retaining: state.retaining,
					                                         associatedStorage: event))
					signal.statusLock.unlock()

					if signal.sendLock.try() {
						// Acquire `statusLock`. If the termination has still not yet been
						// handled, take it over and bump the status to `terminated`.
						signal.statusLock.lock()

						if case let .terminating(state) = signal.status {
							signal.status = .terminated
							signal.statusLock.unlock()

							state.sendTerminated()
						} else {
							signal.statusLock.unlock()
						}

						signal.sendLock.unlock()
						signal.swapDisposable()?.dispose()
					}
				} else {
					signal.statusLock.unlock()
				}
			} else {
				var shouldDispose = false

	}
}

/// The state of a `Signal`.
///
/// `SignalState` is guaranteed to be laid out as a tagged pointer by the Swift
/// compiler in the support targets of the Swift 3.0.1 ABI.
///
/// 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(SignalStateSnapshot<Value, Error, ()>)

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

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

/// The state snapshot of a `Signal` which contains the bag of observers,
/// 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.
private final class SignalStateSnapshot<Value, Error: Swift.Error, U> {
	/// The observers of the `Signal`.
	fileprivate let observers: Bag<Signal<Value, Error>.Observer>

