RACQueueScheduler+Subclass.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // RACQueueScheduler+Subclass.h
  3. // ReactiveCocoa
  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. /// An interface for use by GCD queue-based subclasses.
  11. ///
  12. /// See RACScheduler+Subclass.h for subclassing notes.
  13. @interface RACQueueScheduler ()
  14. /// The queue on which blocks are enqueued.
  15. #if OS_OBJECT_USE_OBJC
  16. @property (nonatomic, strong, readonly) dispatch_queue_t queue;
  17. #else
  18. // Swift builds with OS_OBJECT_HAVE_OBJC_SUPPORT=0 for Playgrounds and LLDB :(
  19. @property (nonatomic, assign, readonly) dispatch_queue_t queue;
  20. #endif
  21. /// Initializes the receiver with the name of the scheduler and the queue which
  22. /// the scheduler should use.
  23. ///
  24. /// name - The name of the scheduler. If nil, a default name will be used.
  25. /// queue - The queue upon which the receiver should enqueue scheduled blocks.
  26. /// This argument must not be NULL.
  27. ///
  28. /// Returns the initialized object.
  29. - (id)initWithName:(NSString *)name queue:(dispatch_queue_t)queue;
  30. /// Converts a date into a GCD time using dispatch_walltime().
  31. ///
  32. /// date - The date to convert. This must not be nil.
  33. + (dispatch_time_t)wallTimeWithDate:(NSDate *)date;
  34. @end