[swift-users] Is there method indiicate current thread is mainthread in swift?

Mark Dalrymple markd at borkware.com
Wed Jul 13 10:41:59 CDT 2016


To really split hairs, the iPhone 10.10 SDK from Xcode 8.0 beta 1 has the
+isMainThread, and beta 2 has the class property :-)  (being a collector of
header files...)

(and I do need to break that 8.2 for 8-beta-2 habit)

++md


On Wed, Jul 13, 2016 at 11:34 AM, Jens Alfke <jens at mooseyard.com> wrote:

>
> > On Jul 13, 2016, at 7:20 AM, Mark Dalrymple via swift-users <
> swift-users at swift.org> wrote:
> >
> > It's a change in Xcode 8.2 - NSThread.isMainThread in ObjC land is now a
> class property:
>
>                 ^^ Xcode 8.0 (beta)
>
> > In Xcode 8.1(and since iPhone OS 2) it was a regular old-school class
> method:
>
>         ^^ Xcode 7.x
>
> Strictly speaking, this is a change in the iOS 10 / macOS 10.12 SDKs (but
> of course they’re rev-locked to Xcode versions.)
>
> —Jens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160713/7a769f8f/attachment.html>


More information about the swift-users mailing list