title: semaphore_wait_trap when accessing class singleton using Swift
body: <p>I'm running into a strange problem. I can access my classes singleton instance just fine, but if I try to access it again it just appears to hang. Here is a simple version of the code:</p>
  
  <pre><code>private let _SharedInstance = MyManager()
  
  class MyManager: NSObject {
  
      class var sharedInstance: MyManager {
          return _SharedInstance
      }
  
      override init() {
          super.init()
  
          println("init")
  
          println(self.accessToken())
          println(MyManager)
          println("test 1")
          println(MyManager.sharedInstance)
          println("test 2")
      }
  
  }
  </code></pre>
  
  <p>In this case it is calling it from within the <code>init</code> of itself, but it happens elsewhere.</p>
  
  <p>The code never gets to <code>test 2</code>. As soon as it access <code>MyManager.sharedInstance</code> it hangs. No errors or warnings.</p>
  
  <p>If I pause the debugger I can see it is currently having on <code>semaphore_wait_trap</code></p>
  
  <p>Picture (difference class names):</p>
  
  <p><img src="https://i.stack.imgur.com/GR78A.png" alt="Stack trace"></p>
  
  <p>Restarting Xcode or the computer hasn't helped.</p>