     var state : OSScannerManagerState = .Idle {
         didSet
         {
-            NSNotificationCenter.defaultCenter().postNotificationName(self.state.rawValue, object:self);
+            dispatch_async(dispatch_get_main_queue()) { () -> Void in
+                NSNotificationCenter.defaultCenter().postNotificationName(self.state.rawValue, object:self);
+            };
         }
     };
     
+    private let calibrationSemaphore : dispatch_semaphore_t = dispatch_semaphore_create(1);
+    private let featureExtractionSemaphore : dispatch_semaphore_t = dispatch_semaphore_create(1);
+    private let threadSafeConcurrentFrameArrayConcurrentQueue : dispatch_queue_t = dispatch_queue_create("OSScannerManagerThreadSafeConcurrentFrameArrayConcurrentQueue", DISPATCH_QUEUE_CONCURRENT);//don't use that queue anywhere else other than custom getters and setters for concurrentFrameArray property.
+    private var consecutiveFrames : [OSBaseFrame] = [OSBaseFrame]();
+
+// MARK: Custom concurrentFrameArray Getter/Setters
+    
+    private func frameAtIndex(index : Int) -> OSBaseFrame
+    {
+        var frame : OSBaseFrame!
+        
+        dispatch_sync(self.threadSafeConcurrentFrameArrayConcurrentQueue) { () -> Void in
+            frame = self.consecutiveFrames[index];
+        };
+        
+        return frame;
+    }
+    
+    private func removeFrame(index : Int)
+    {
+        dispatch_barrier_async(self.threadSafeConcurrentFrameArrayConcurrentQueue) { () -> Void in
+            self.consecutiveFrames.removeAtIndex(index);
+        };
+    }
+    
+    private func appendFrame(frame : OSBaseFrame)
+    {
+        dispatch_barrier_async(self.threadSafeConcurrentFrameArrayConcurrentQueue) { () -> Void in
+            self.consecutiveFrames.append(frame);
+        };
+    }
+    
 // MARK: Lifecycle
+    
     static let sharedInstance = OSScannerManager();
 
     init()

    case ContentLoading = "OSScannerManagerDidStartContentLoading"
    case ContentLoaded = "OSScannerManagerDidStartContentLoaded"
    case Scanning = "OSScannerManagerScaning"
}

class OSScannerManager : OS3DFrameConsumerProtocol

    }
    
// MARK: Utilities
    
// MARK: OS3DFrameConsumerProtocol
    func didCapturedFrame(image: UIImage, depthFrame: [Float])
    {
        var capturedFrame : OSBaseFrame = OSBaseFrame(image: image, depth: depthFrame);
        self.startSingleFrameOperations(capturedFrame);
    }
}
