title: Proper way to do polling in swift?
body: <p>I have lot of experience with other programming languages, but not so much in swift 3. I want to do polling loop. This is what i have written:</p>
  
  <pre><code>DispatchQueue.global(qos: .userInitiated).async {
              [unowned self] in
              while self.isRunning {
                  WebService.getPeople(completion: nil)
                  sleep(100)
              }
          }
  </code></pre>
  
  <p>This works fine for me, every 100 seconds, i do polling, and then make this thread sleep. What I am wondering, is this correct way to do this in swift 3?</p>