RACScheduler+Private.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // RACScheduler+Private.h
  3. // ReactiveObjC
  4. //
  5. // Created by Josh Abernathy on 11/29/12.
  6. // Copyright (c) 2012 GitHub, Inc. All rights reserved.
  7. //
  8. #import "RACScheduler.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. // The thread-specific current scheduler key.
  11. extern NSString * const RACSchedulerCurrentSchedulerKey;
  12. // A private interface for internal RAC use only.
  13. @interface RACScheduler ()
  14. // A dedicated scheduler that fills two requirements:
  15. //
  16. // 1. By the time subscription happens, we need a valid +currentScheduler.
  17. // 2. Subscription should happen as soon as possible.
  18. //
  19. // To fulfill those two, if we already have a valid +currentScheduler, it
  20. // immediately executes scheduled blocks. If we don't, it will execute scheduled
  21. // blocks with a private background scheduler.
  22. + (instancetype)subscriptionScheduler;
  23. // Initializes the receiver with the given name.
  24. //
  25. // name - The name of the scheduler. If nil, a default name will be used.
  26. //
  27. // Returns the initialized object.
  28. - (instancetype)initWithName:(nullable NSString *)name;
  29. @end
  30. NS_ASSUME_NONNULL_END