Skip to content

[SR-1075] Expose thread number in NSThread  #4162

Open
@masters3d

Description

@masters3d
Previous ID SR-1075
Radar None
Original Reporter @masters3d
Type New Feature
Additional Detail from JIRA
Votes 2
Component/s Foundation
Labels New Feature
Assignee None
Priority Medium

md5: ea6db053af0cd3a854088f20dd746370

Issue Description:

In the apple objc NSThread I am able to get the thread number using something like this.
let threadNumber = thread.valueForKeyPath("private.seqNum").integerValue

I'd like to be able to get the thread number in the swift version of foundation but my understanding is that is not avalible because it is private in obc.

NSThread on Obj Foundation print something like this to the console.
```<NSThread: 0x100605cf0>{number = 1, name = main}```
Number here is the thread number.

http://stackoverflow.com/questions/7473258/po-nsthread-currentthread
http://stackoverflow.com/questions/25850867/how-to-cancel-one-of-many-threads-in-swift
http://stackoverflow.com/questions/15558411/nsthread-number-on-ios/15559143#15559143

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions