GithubHelp home page GithubHelp logo

keithwahn / grkconcurrentcollections Goto Github PK

View Code? Open in Web Editor NEW

This project forked from levigroker/grkconcurrentcollections

0.0 1.0 0.0 18 KB

Thread safe collections for Objective C.

License: Other

Ruby 2.54% Objective-C 97.46%

grkconcurrentcollections's Introduction

GRKConcurrentCollections

Threadsafe collections for Objective C.

A collection of classes which encapsulate NSMutableArray, NSMutableDictionary, and NSMutableSet for threadsafe concurrent read and write access. Inspired by a post by Mike Ash.

Future Ideas

  • More comprehensive tests.
  • Additional collection types.

Installing

If you're using CocoPods it's as simple as adding this to your Podfile:

pod 'GRKConcurrentCollections'

otherwise, simply add the contents of the GRKConcurrentCollections subdirectory to your project.

Documentation

To use, simply import the header for the collection you want to use:

#import "GRKConcurrentMutableArray.h"
#import "GRKConcurrentMutableDictionary.h"
#import "GRKConcurrentMutableSet.h"

Then you can use instances of the same to perform read and write operations to the instances from multiple threads without being concerned about collisions.

Please note that when modifying the contents of the collections from multiple threads, the actual contents will be unpredictable due to thread scheduling. One should consider using the "Snapshot" methods to get the contents at any one particular time, or the augmentWithBlock: method to perform a sequence of operations on the collection without being concerned about concurrency.

Additional documentation is available in each header file.

Disclaimer and Licence

About

A professional iOS engineer by day, my name is Levi Brown. Authoring a blog grokin.gs, I am reachable via:

Twitter @levigroker
App.net @levigroker
Email [email protected]

Your constructive comments and feedback are always welcome.

grkconcurrentcollections's People

Contributors

levigroker avatar

Watchers

James Cloos avatar

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.