def main_fiber : FiberSource
Returns the Fiber representing the thread's main stack.
Match data is unique per thread.
Match data contains a buffer for backtracking when matching in interpreted mode (non-JIT). This buffer is heap-allocated and should be re-used for subsequent matches.
Only a single match function can run per thread at any given time, so there can't be any concurrent access to the match data buffer.
Returns the Thread object associated to the running system thread.
Creates and starts a new system thread.
Used once to initialize the thread object representing the main thread of the process (that already exists).
Delays execution for a brief moment.
Changes the name of the current thread.
Blocks the current thread for the duration of time.
Yields the currently running thread.
Returns the Fiber currently running on the thread.
Returns the Fiber currently running on the thread.
Returns the Fiber currently running on the thread.
Holds the GC thread handler
Holds the GC thread handler
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
Changes the Thread#name property but doesn't update the system name.
Suspends the current thread until this thread terminates.
Returns the Fiber representing the thread's main stack.
Returns the Fiber representing the thread's main stack.
Appends a short String representation of this object which includes its class name and its object address.
Crystal::System::Thread
Crystal::System::Thread
Reference
Reference
Reference
Object
Object
Object
Creates and starts a new system thread.
Used once to initialize the thread object representing the main thread of the process (that already exists).
Blocks the current thread for the duration of time. Clock precision is dependent on the operating system and hardware.
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32> Changes the Thread#name property but doesn't update the system name. Useful on the main thread where we'd change the process name (e.g. top, ps, ...).
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
© 2012–2026 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.19.0/Thread.html