We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a27996f + 0edaa77 commit ef3ccd5Copy full SHA for ef3ccd5
Foundation/NSThread.swift
@@ -143,7 +143,6 @@ open class Thread : NSObject {
143
#endif
144
internal var _status = _NSThreadStatus.initialized
145
internal var _cancelled = false
146
- internal var _name: String?
147
/// - Note: this differs from the Darwin implementation in that the keys must be Strings
148
open var threadDictionary = [String : Any]()
149
@@ -192,14 +191,9 @@ open class Thread : NSObject {
192
191
}
193
194
open var name: String? {
195
- get {
196
- return _name
197
- }
198
- set {
199
- _name = newValue
200
-
+ didSet {
201
if _thread == Thread.current._thread {
202
- _CFThreadSetName(_name)
+ _CFThreadSetName(name)
203
204
205
0 commit comments