title: Example of dispatch_once in Swift
body: <p>Is there an example of how <strong>dispatch_once</strong> should be used in Swift? (Preferably one from Apple.)</p>
  
  <p>Note: In this case, I'm <a href="https://stackoverflow.com/questions/24024549/dispatch-once-singleton-model-in-swift">not using it for a singleton</a>; I want to run arbitrary code exactly once.</p>
  
  <p><strong>Update:</strong> I'm mainly interested in the convention recommended when using this in an instance method, but usage in a class method, function, and in the global context would be useful for completeness sake.</p>