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
terminatingcheck is permitted.Note
The
updateLockwould be acquired.Declaration
Swift
func tryTerminate() -> BoolReturn Value
trueif the attempt succeeds.falseotherwise.
View on GitHub
Install in Dash
init(_:) Instance Method Reference