class

Fiber::ExecutionContext::Parallel::Scheduler

Inherits Fiber::ExecutionContext::Scheduler / Reference / Object

Individual scheduler for the parallel execution context.

The execution context itself doesn't run the fibers. The fibers actually run in the schedulers. Each scheduler in the context increases the parallelism by one. For example a parallel context with 8 schedulers means that a maximum of 8 fibers may run at the same time in different system threads.

Instance methods

inspect(io : IO) : Nil

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>
Source
name
Source
status

Returns the current status of the scheduler. For example "running", "event-loop" or "parked".

Source
to_s(io : IO) : Nil

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>
Source