cocos3d  2.0.0
Instance Methods | Class Methods | Properties | List of all members
CC3Backgrounder Class Reference

#import <CC3Backgrounder.h>

Inheritance diagram for CC3Backgrounder:
Inheritance graph
[legend]

Instance Methods

(void) - runBlock:
 
(void) - runBlock:after:
 

Class Methods

(id) + sharedBackgrounder
 

Properties

long queuePriority
 

Detailed Description

CC3Backgrounder performs activity on a background thread by submitting tasks to a Grand Central Dispatch (GCD) queue.

In order to ensure that the GL engine is presented activity in an defined order, CC3Backgrounder is a singleton.

Method Documentation

- (void) runBlock: (void)  block

Runs the specified block of code by dispatching it to the global GCD queue identified by the value of the queuePriority property.

- (void) runBlock: (void)  block
after: (NSTimeInterval)  seconds 

Waits the specified number of seconds, then runs the specified block of code by dispatching it to the global GCD queue identified by the value of the queuePriority property.

+ (id) sharedBackgrounder

Returns the singleton backgrounder instance.

Property Documentation

- (long) queuePriority
readwritenonatomicassign

Specifies the priority of the GCD global dispatch queue to which background tasks are dispatched.

Setting this property will affect any subsequent tasks submitted to the runBlock: method.

The value of this property must be one of the following GCD constants:

  • DISPATCH_QUEUE_PRIORITY_HIGH
  • DISPATCH_QUEUE_PRIORITY_DEFAULT
  • DISPATCH_QUEUE_PRIORITY_LOW
  • DISPATCH_QUEUE_PRIORITY_BACKGROUND (available starting with iOS 5)

The initial value of this property is DISPATCH_QUEUE_PRIORITY_BACKGROUND when running under iOS 5 or above, or DISPATCH_QUEUE_PRIORITY_LOW otherwise.


The documentation for this class was generated from the following file: