Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save dbonates/6f0f66c8eeabf2ae90dc59f52dd90c7f to your computer and use it in GitHub Desktop.

Select an option

Save dbonates/6f0f66c8eeabf2ae90dc59f52dd90c7f to your computer and use it in GitHub Desktop.
var executing: Bool { get } // true if the receiver is executing, otherwise false.
var finished: Bool { get } //true if the receiver has finished execution, otherwise false.
var cancelled: Bool { get } //true if the receiver has been cancelled, otherwise false.
var objDS= DeviceStatus()
let thread: NSThread = NSThread(target: objDS, selector: "checkDeviceStatus", object: nil)
if thread.executing{
println("executing")
}
if thread.finished{
println("finished")
}
if thread.cancelled{
println("cancelled")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment