RACQueueScheduler+Subclass.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // RACQueueScheduler+Subclass.h
  3. // ReactiveObjC
  4. //
  5. // Created by Josh Abernathy on 6/6/13.
  6. // Copyright (c) 2013 GitHub, Inc. All rights reserved.
  7. //
  8. #import "RACQueueScheduler.h"
  9. #import "RACScheduler+Subclass.h"
  10. NS_ASSUME_NONNULL_BEGIN
  11. /// An interface for use by GCD queue-based subclasses.
  12. ///
  13. /// See RACScheduler+Subclass.h for subclassing notes.
  14. @interface RACQueueScheduler ()
  15. /// The queue on which blocks are enqueued.
  16. #if OS_OBJECT_USE_OBJC
  17. @property (nonatomic, strong, readonly) dispatch_queue_t queue;
  18. #else
  19. // Swift builds with OS_OBJECT_HAVE_OBJC_SUPPORT=0 for Playgrounds and LLDB :(
  20. @property (nonatomic, assign, readonly) dispatch_queue_t queue;
  21. #endif
  22. /// Initializes the receiver with the name of the scheduler and the queue which
  23. /// the scheduler should use.
  24. ///
  25. /// name - The name of the scheduler. If nil, a default name will be used.
  26. /// queue - The queue upon which the receiver should enqueue scheduled blocks.
  27. /// This argument must not be NULL.
  28. ///
  29. /// Returns the initialized object.
  30. - (instancetype)initWithName:(nullable NSString *)name queue:(dispatch_queue_t)queue;
  31. /// Converts a date into a GCD time using dispatch_walltime().
  32. ///
  33. /// date - The date to convert. This must not be nil.
  34. + (dispatch_time_t)wallTimeWithDate:(NSDate *)date;
  35. @end
  36. NS_ASSUME_NONNULL_END