We have function like this in swift 2.2 for printing a log message with the current running thread:
func MyLog(_ message: String) { if Thread.isMainThre
If you don't like unsafe pointers and c-strings, there is another, safe solution:
if let currentQueueLabel = OperationQueue.current?.underlyingQueue?.label { print(currentQueueLabel) // Do something... }
I don't know any cases when the currentQueueLabel will be nil.
currentQueueLabel
nil