       tail.memory.next = node
       tail = node
     }
-    OSSpinLockUnlock(&lock)
   }
 
   func dequeue() -> T?
   {
-    OSSpinLockLock(&lock)
     let node = head
     if node != nil
     { // Promote the 2nd item to 1st
       head = node.memory.next
-    }
-    OSSpinLockUnlock(&lock)
 
-    if node != nil
-    {
       let element: T = node.memory.elem().move()
       OSAtomicEnqueue(pool, node, 0)
       return element

  private var tail: UnsafeMutablePointer<Node> = nil

  private let pool = AtomicStackInit()
  private var lock = OS_SPINLOCK_INIT

  init() { }


    node.memory.next = nil
    node.memory.elem().initialize(newElement)

    if head == nil
    {
      head = node
