One Logo Pool Ball
Foundation · IOS API REFERENCE

Thread

class · SDK 27.1

class Thread

Members (30)

static · iOS 10.0+

detachNewThread

TypeScript
static detachNewThread(block: (() => void)): void
Swift declaration
class func detachNewThread(_ block: @escaping @Sendable () -> Void)
static

exit

TypeScript
static exit(): void
Swift declaration
class func exit()
static

isMultiThreaded

TypeScript
static isMultiThreaded(): boolean
Swift declaration
class func isMultiThreaded() -> Bool
static

setThreadPriority

TypeScript
static setThreadPriority(p: number): boolean
Swift declaration
class func setThreadPriority(_ p: Double) -> Bool
static

sleep

TypeScript
static sleepForTimeInterval(ti: number): void
Swift declaration
class func sleep(forTimeInterval ti: TimeInterval)
static

sleep

TypeScript
static sleepUntil(date: globalThis.Date): void
Swift declaration
class func sleep(until date: Date)
static

threadPriority

TypeScript
static threadPriority(): number
Swift declaration
class func threadPriority() -> Double
get · iOS 2.0+

callStackReturnAddresses

TypeScript
static get callStackReturnAddresses(): Array<NSNumber>
Swift declaration
class var callStackReturnAddresses: [NSNumber] { get }
get · iOS 4.0+

callStackSymbols

TypeScript
static get callStackSymbols(): Array<string>
Swift declaration
class var callStackSymbols: [String] { get }
get

current

TypeScript
static get current(): Thread
Swift declaration
class var current: Thread { get }
get · iOS 2.0+

isMainThread

TypeScript
static get isMainThread(): boolean
Swift declaration
class var isMainThread: Bool { get }
get · iOS 2.0+

main

TypeScript
static get main(): Thread
Swift declaration
class var main: Thread { get }
method · iOS 2.0+

cancel

TypeScript
cancel(): void
Swift declaration
func cancel()
init · iOS 2.0+

init

TypeScript
static init(): Thread
Swift declaration
init()
init · iOS 10.0+

init

TypeScript
static initBlock(block: (() => void)): Thread
Swift declaration
convenience init(block: @escaping @Sendable () -> Void)
method · iOS 2.0+

main

TypeScript
main77396(): void
Swift declaration
func main()
method · iOS 2.0+

start

TypeScript
start(): void
Swift declaration
func start()
get · iOS 2.0+

isCancelled

TypeScript
get isCancelled(): boolean
Swift declaration
var isCancelled: Bool { get }
get · iOS 2.0+

isExecuting

TypeScript
get isExecuting(): boolean
Swift declaration
var isExecuting: Bool { get }
get · iOS 2.0+

isFinished

TypeScript
get isFinished(): boolean
Swift declaration
var isFinished: Bool { get }
get · iOS 2.0+

isMainThread

TypeScript
get isMainThread37211(): boolean
Swift declaration
var isMainThread: Bool { get }
get · iOS 2.0+

name

TypeScript
get name(): (string) | null
Swift declaration
var name: String? { get set }
set · iOS 2.0+

name

TypeScript
set name(value: (string) | null)
Swift declaration
var name: String? { get set }
get · iOS 8.0+

qualityOfService

TypeScript
get qualityOfService(): QualityOfService
Swift declaration
var qualityOfService: QualityOfService { get set }
set · iOS 8.0+

qualityOfService

TypeScript
set qualityOfService(value: QualityOfService)
Swift declaration
var qualityOfService: QualityOfService { get set }
get · iOS 2.0+

stackSize

TypeScript
get stackSize(): number
Swift declaration
var stackSize: Int { get set }
set · iOS 2.0+

stackSize

TypeScript
set stackSize(value: number)
Swift declaration
var stackSize: Int { get set }
get

threadDictionary

TypeScript
get threadDictionary(): NSMutableDictionary
Swift declaration
var threadDictionary: NSMutableDictionary { get }
get · iOS 4.0+

threadPriority

TypeScript
get threadPriority85030(): number
Swift declaration
var threadPriority: Double { get set }
set · iOS 4.0+

threadPriority

TypeScript
set threadPriority85030(value: number)
Swift declaration
var threadPriority: Double { get set }

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

Thread.detachNewThreadSelector(_:toTarget:with:)

Objective-C selectors cannot cross the bridge.

Thread.init(target:selector:object:)

Objective-C selectors cannot cross the bridge.

All Foundation types →