diff --git a/Tests/ReactiveSwiftTests/ActionSpec.swift b/Tests/ReactiveSwiftTests/ActionSpec.swift index b7fd27411..00cb4719d 100755 --- a/Tests/ReactiveSwiftTests/ActionSpec.swift +++ b/Tests/ReactiveSwiftTests/ActionSpec.swift @@ -121,6 +121,13 @@ class ActionSpec: QuickSpec { let action1 = Action<(), ViewModel, NoError> { SignalProducer(value: ViewModel()) } + // Fixed in #267. (https://github.com/ReactiveCocoa/ReactiveSwift/pull/267) + // + // The deadlock happened as the observer disposable releases the closure + // `{ _ in viewModel }` here without releasing the mapped signal's + // `updateLock` first. The deinitialization triggers the propagation of + // terminal event of the Action, which eventually hits the mapped + // signal. action1.values .flatMap(.latest) { viewModel in viewModel.action2.values.map { _ in viewModel } } .observeValues { _ in }