Coder Social home page Coder Social logo

async's Introduction

Async

Version Platform

Async is a set of functions for working with asynchronous blocks in Objective-C.

Getting Started

Project/AsyncTests.xcodeproj contains a simple set of tests that demonstrate how to use the library.

Usage

  • Include Async.h in your project.
  • All Async functions are class-level methods on the Async object.
  • Sets of blocks are passed in as an NSArray.
  • These blocks always have success and failure callback blocks which conclude the asynchronous function.
  • Blocks may additionally receive and return a parameter depending on the method used
  • All Async functions have a final success and failure block. If any one block fails, failure() will be called. If not, succcess() is called

Async Functions

  • series: run a set of blocks in sequential order
  • parallel: run a set of blocks in parallel
  • eachSeries: runs a block in series with every item in an array
  • eachParallel: runs a block in parallel with every item in an array
  • mapParallel: runs a block in parallel with every item in an array, collecting all the return values
  • mapSeries: runs a block in series with every item in an array, collecting all the return values
  • repeatUntilSuccess: repeat a block until it succeeds or maxAttempts is reached
  • waterfall: run a set of blocks in series, passing the return value of a block to the next block

Author

John Wana, [email protected]

License

Async is available under the MIT license. See the LICENSE file for more info.

async's People

Contributors

johnwana avatar

Stargazers

 avatar Almog Melamed avatar Fabio Nisci avatar Med0paW avatar  avatar Volodymyr Kopytsia avatar Shannon Chou avatar Yaogang Lian avatar Jayson Rhynas avatar Atsushi Araki avatar Angus H. avatar Michael avatar  avatar K。 avatar Gaston Morixe avatar Mo Kouli avatar Jakub Knejzlík avatar Matt Holden avatar Andrew Zeus avatar Jonathan Diaz avatar wyefei avatar  avatar Blake Schwendiman avatar Steven Zhang avatar James Spencer avatar Yasuhiro Inami avatar  avatar Parker Wightman avatar Max Desiatov avatar @thingsdoer avatar

Watchers

 avatar

async's Issues

Add 'each'

[Async eachParallel:...] and [Async eachSeries:...] would be useful instead of abusing [Async map...] to get the behavior

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.