Skip to content

Instantly share code, notes, and snippets.

@possen
possen / BlockNotificationSample.swift
Last active November 9, 2015 04:01
Example Implementation of a closure based api similar to NSNotificationCenter -- should support multiple threads by serializing access, allows adding observers for a particular key where all blocks will get called back. for that key
//
// Description: Example implementation similar to NSNotificationCenter
// Language: Swift 2.1
// Date: November 7, 2015
//
// Author: Paul Ossenbruggen
//
// should support multiple threads by serializing access.
//
// allows posting to observers for a particular key where all blocks will get