Latest 0.1.0
Homepage https://github.com/IslandZero/YMAsyncQueue
License MIT
Platforms ios 7.0, osx 10.9, requires ARC
Authors

YMAsyncQueue is a util class to execute block-based async methods serially.

Prerequisite

YMAsyncQueue uses __nonnull annotation and Objective-C generic classes, thus Xcode 7+ is required.

Usage

  • Create a instance
  • Queue blocks using -run:name:
  • Invoke releaseBlock once block finished

Queue will run all queued blocks serially

self.queue = [[YMAsyncQueue alloc] init];

[queue run:^(YMAsyncQueueReleaseBlock releaseBlock){
  [self doSomethingAsyncWithComplete:^{
    // Invoke releaseBlock after complete thus next block queued could run
    releaseBlock();
  }];
} name:@"BLOCK_1"]

License

See LICENSE file

Latest podspec

{
    "name": "YMAsyncQueue",
    "version": "0.1.0",
    "summary": "YMAsyncQueue is a util class to execute block-based async methods serially.",
    "homepage": "https://github.com/IslandZero/YMAsyncQueue",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ryan Guo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/IslandZero/YMAsyncQueue.git",
        "tag": "v0.1.0"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "7.0",
        "osx": "10.9"
    },
    "source_files": "YMAsyncQueue/*.{h,m}"
}

Pin It on Pinterest

Share This