Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A small Objective-C wrapper around GCD
Objective-C C
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.idea
JSGCDDispatcher.xcodeproj
JSGCDDispatcher
Specs
examples/DispatcherExample
.gitignore
.gitmodules
JSGCDDispatcher.podspec
JSGCDDispatcher.vendorspec
LICENSE
README.markdown

README.markdown

JSGCDDispatcher, a small Objective-C wrapper around GCD

JSGCDDipatcher is a small Objective-C wrapper around GCD that provides a simple interface to submit blocks to GCD either on the serial or concurrent queue.

Global Queue

[[JSGCDDipatcher sharedDispatcher] dispatch:^{
  // Busy Work
}];
[[JSGCDDipatcher sharedDispatcher] dispatch:^{
  // Busy Work
} priority:DISPATCH_QUEUE_PRIORITY_DEFAULT];

Serial Queue

[target dispatchOnSerialQueue:^{
  // Busy serial work
}];
[[JSGCDDipatcher sharedDispatcher] submitSerialQueueCompletionListener:^{
 // Serial jobs complete
}];

Background Tasks (iOS)

Invoke this method when you have a task that is important and should not be interrupted if the application is suddenly placed in the background.

[target dispatchBackgroundTask:^(UIBackgroundTaskIdentifier identifier) {
  if(identifier == UIBackgroundTaskInvalid) {
    // Almost out of time to run the task
  } else {
    // Good to go
  }
} priority:DISPATCH_QUEUE_PRIORITY_DEFAULT];

TODO

  • Better documentation
  • Add OS X Test Target
Something went wrong with that request. Please try again.