     public init() {}
     
     /**
-    Convenience function for add(_:_:). Simply takes a function that will 
-    receive all messages for the life time of this instance, or until the
-    returned entry is removed.
-    
-    - parameter function: The function to receive any messages.
-    - returns: An opaque object that can be used to stop any further messages.
-    */
+     Convenience function for add(_:_:). Simply takes a function that will
+     receive all messages for the life time of this instance, or until the
+     returned entry is removed.
+     
+     - parameter function: The function to receive any messages.
+     - returns: An opaque object that can be used to stop any further messages.
+     */
     public func add(function: MessageHandler) -> MessageRouterEntry<T> {
         return add(self) { _ in function }
     }
     
     /**
-    The given function will receive any messages for the life time of `object`.
-    Typically called like this:
-    
-        recipients.add(self, self.dynamicType.handleMessage)
-    
-    - parameter object: The object that owns the given function.
-    - parameter function: The function that will be called with any messages. Typically a function on `object`.
-    - returns: An opaque object that can be used to stop any further messages.
-    */
+     The given function will receive any messages for the life time of `object`.
+     Typically called like this:
+     
+     recipients.add(self, self.dynamicType.handleMessage)
+     
+     - parameter object: The object that owns the given function.
+     - parameter function: The function that will be called with any messages. Typically a function on `object`.
+     - returns: An opaque object that can be used to stop any further messages.
+     */
     public func add<R: Recipient>(object: R, _ function: R->MessageHandler) -> MessageRouterEntry<T> {
         let entry = MessageRouterEntry(object: object, function: { function($0 as! R) })
         sync {

    }
    
    /**
    Removes the given entry from the list of recipients. 
    
    - parameter entry: The entry to remove.
    */
    public func remove(entry: MessageRouterEntry<T>) {
        sync {
            self.entries = self.entries.filter { $0 !== entry }

    private let queue = dispatch_queue_create("com.robertbrown.Atoms.Messaging", DISPATCH_QUEUE_SERIAL)
    
    /**
     Ensures that critical code is run synchronously.
     This function must be called before accessing `entries`.
     
     - parameter function: The function containing the critical code.
     */
    private func sync(function: ()->()) {
        dispatch_sync(queue, function)
    }
