Latest 1.0
Homepage https://github.com/levigroker/GRKConcurrentCollections
License Creative Commons Attribution 3.0 Unported License
Platforms ios 7.0, osx 10.9
Authors

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.

Latest podspec

{
    "name": "GRKConcurrentCollections",
    "version": "1.0",
    "summary": "Threadsafe collections for Objective C.",
    "description": "Classes which encapsulate NSMutableArray, NSMutableDictionary, and NSMutableSet fornthreadsafe concurrent read and write access.n",
    "homepage": "https://github.com/levigroker/GRKConcurrentCollections",
    "license": "Creative Commons Attribution 3.0 Unported License",
    "authors": {
        "Levi Brown": "[email protected]"
    },
    "social_media_url": "https://twitter.com/levigroker",
    "source": {
        "git": "https://github.com/levigroker/GRKConcurrentCollections.git",
        "tag": "1.0"
    },
    "platforms": {
        "ios": "7.0",
        "osx": "10.9"
    },
    "source_files": "GRKConcurrentCollections/**/*.{h,m}"
}

Pin It on Pinterest

Share This