Inherits from RACDisposable : NSObject
Declared in RACSerialDisposable.h

Overview

A disposable that contains exactly one other disposable and allows it to be swapped out atomically.

Tasks

  •   disposable

    Disposing of the receiver will also dispose of the current disposable set for this property, then set the property to nil. If any new disposable is set after the receiver is disposed, it will be disposed immediately and this property will remain set to nil.

    property
  • + serialDisposableWithDisposable:

    Returns a RACSerialDisposable, or nil if an error occurs.

  • – swapInDisposable:

    Returns the previous value for the disposable property.

Properties

disposable

@property (atomic, strong) RACDisposable *disposable
Discussion

Disposing of the receiver will also dispose of the current disposable set for this property, then set the property to nil. If any new disposable is set after the receiver is disposed, it will be disposed immediately and this property will remain set to nil.

Declared In

RACSerialDisposable.h

Class Methods

serialDisposableWithDisposable:

+ (instancetype)serialDisposableWithDisposable:(RACDisposable *)disposable
Discussion

Returns a RACSerialDisposable, or nil if an error occurs.

Declared In

RACSerialDisposable.h

Instance Methods

swapInDisposable:

- (RACDisposable *)swapInDisposable:(RACDisposable *)newDisposable
Discussion

Returns the previous value for the disposable property.

Declared In

RACSerialDisposable.h