init(_:)
public init(_ generator: (Observer) -> Disposable?)
Initialize a Signal that will immediately invoke the given generator, then forward events sent to the given observer.
Note
The disposable returned from the closure will be automatically disposed if a terminating event is sent to the observer. The Signal itself will remain alive until the observer is released.
-
Try to terminate the signal.
If the signal is alive or has terminated, it fails gracefully. In other words, calling this method as a result of a false positive
terminating
check is permitted.Note
The
updateLock
would be acquired.Declaration
Swift
func tryTerminate() -> Bool
Return Value
true
if the attempt succeeds.false
otherwise.