You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a collection of methods around the dispatch queue that will run synchronously when being ran in a test target, but will act asynchronously in application targets. Tested.
/// Async in App Code, sync in Test Code, waits for a time then runs the block on the main queueexternvoidar_dispatch_after(NSTimeInterval time, dispatch_block_t block);
/// Async in App Code, sync in Test Code, waits for a time then runs the block on your own queueexternvoidar_dispatch_after_on_queue(NSTimeInterval time, dispatch_queue_t queue, dispatch_block_t block);
/// Async in App Code, sync in Test Code, runs a block on a default queue on another threadexternvoidar_dispatch_async(dispatch_block_t block);
/// Async in App Code, sync in Test Code, runs a block on the main threadexternvoidar_dispatch_main_queue(dispatch_block_t block);
/// Async in App Code, sync in Test Code, runs block on a queueexternvoidar_dispatch_on_queue(dispatch_queue_t queue, dispatch_block_t block);
Usage
To run the example project, clone the repo, and run pod install from the Example directory first.
Installation
ar_dispatch is available through CocoaPods. To install
it, simply add the following line to your Podfile: