Class: LLM::Function::Ractor::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/llm/function/ractor_group.rb

Overview

The Group class wraps an array of Task objects that are running LLM::Function calls concurrently.

Instance Method Summary collapse

Constructor Details

#initialize(tasks) ⇒ LLM::Function::Ractor::Group

Parameters:



12
13
14
# File 'lib/llm/function/ractor_group.rb', line 12

def initialize(tasks)
  @tasks = tasks
end

Instance Method Details

#alive?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/llm/function/ractor_group.rb', line 18

def alive?
  @tasks.any?(&:alive?)
end

#waitArray<LLM::Function::Return> Also known as: value



24
25
26
# File 'lib/llm/function/ractor_group.rb', line 24

def wait
  @tasks.map(&:wait)
end