From 61f8c866c69942cadadf3be6fbe29b4e6d2f6699 Mon Sep 17 00:00:00 2001 From: Dan Fabulich Date: Wed, 22 Apr 2026 15:17:34 -0700 Subject: [PATCH] Add support for `Thread.name` --- Sources/SkipFoundation/Thread.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/SkipFoundation/Thread.swift b/Sources/SkipFoundation/Thread.swift index cca2f51..c0d8854 100644 --- a/Sources/SkipFoundation/Thread.swift +++ b/Sources/SkipFoundation/Thread.swift @@ -26,6 +26,11 @@ public struct Thread : Hashable, Sendable, KotlinConverting { self == Thread.current } + public var name: String? { + get { platformValue.getName() } + set { platformValue.setName(newValue ?? "") } + } + public static var callStackSymbols: [String] { Array(Thread.current.platformValue.getStackTrace().map({ $0.toString() })) }