[swift-evolution] LibDispatch : access to current queue, or queue name
Jérôme Duquennoy
jerome+swift at duquennoy.fr
Sun Jun 19 17:52:34 CDT 2016
Hi everyone,
With the release of swift 3, The interface to libDispatch has evolved quite a lot, to a much cleaner, object oriented interface.
There seems to be one feature that is no longer available :
In swift 2, it was possible to get the current queue label using "dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL)".
In the new interface, the DispatchQueue has a label property, but there seems to be no way to get the current queue.
Is that a design decision ?
If not, a "current" class property should probably be added to "DispatchQueue".
If yes, maybe we could add a "currentQueueLabel" class property to "DispatchQueue", but this doesn't look right to me : why should only this property of the current queue be available, and not other ones like "qos" ?
This comes a bit late, I'm sorry for not spotting that when SE-0088 was being reviewed !
Jerome Duquennoy
More information about the swift-evolution
mailing list