Skip to content

Thread

graph BT
N1["Thread"] -->|inherits| N2["Any"];

Characteristics

Quality Value
Inherits global.Any
Extends N/A
Decorators #sealed;
Is enum false
Is sealed true
Is extern false
Is abstract false
Is generator false
Has value semantics false
Has stored properties true
Should register destructor true
Has atomic memory false
Is copy assignable false
Is zero initializable false

Functions

sleep_for

#Gambol.function.noinline
sleep_for (duration Time) -> Nil

sleep_until

#Gambol.function.noinline
sleep_until (time Time) -> Nil

yield_time

#Gambol.function.alwaysinline
yield_time () -> Nil

hardware_concurrency

hardware_concurrency () -> UInt32

run

#Gambol.function.noinline
run (f Dynamic, *args, **dargs) -> Thread

Methods

construct

#default
#Gambol.function.alwaysinline
construct (s strictly @Self) -> Self

wait

#Gambol.function.noinline
wait (s @Self, throw Bool = true) -> Dynamic

has_ended

has_ended (s @Self) -> Bool

Properties

__running_threads

global __running_threads Set[Thread]()

__status_lock

global __status_lock Mutex()

__ptr

__ptr Pointer

__function

__function Dynamic

__return

__return Dynamic

__is_exception

__is_exception Bool

__args

__args DynamicList?

__dargs

__dargs Dict[String, ]?

__is_expired

__is_expired Bool

__num_waiting

__num_waiting NInt

__wait_semaphore

__wait_semaphore Semaphore(0)