ZTSignalSubscription

A SignalLister represenents an instance and its association with a ZTSignal.

  • Whether the observer should be removed once it observes the ZTSignal firing once. Defaults to false.

  • Assigns a filter to the ZTSignalSubscription. This lets you define conditions under which a observer should actually receive the firing of a ZTSingal. The closure that is passed an argument can decide whether the firing of a ZTSignal should actually be dispatched to its observer depending on the data fired.

    If the closeure returns true, the observer is informed of the fire. The default implementation always returns true.

  • Tells the observer to sample received ZTSignal data and only dispatch the latest data once the time interval has elapsed. This is useful if the subscriber wants to throttle the amount of data it receives from the ZTSignal.

  • Assigns a dispatch queue to the ZTSignalSubscription. The queue is used for scheduling the observer calls. If not nil, the callback is fired asynchronously on the specified queue. Otherwise, the block is run synchronously on the posting thread, which is its default behaviour.

  • Cancels the observer. This will cancelSubscription the listening object from the ZTSignal.