Class: LLM::Function::Ractor::Group
- Inherits:
-
Object
- Object
- LLM::Function::Ractor::Group
- 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
- #alive? ⇒ Boolean
- #initialize(tasks) ⇒ LLM::Function::Ractor::Group constructor
- #wait ⇒ Array<LLM::Function::Return> (also: #value)
Constructor Details
#initialize(tasks) ⇒ LLM::Function::Ractor::Group
12 13 14 |
# File 'lib/llm/function/ractor_group.rb', line 12 def initialize(tasks) @tasks = tasks end |
Instance Method Details
#alive? ⇒ Boolean
18 19 20 |
# File 'lib/llm/function/ractor_group.rb', line 18 def alive? @tasks.any?(&:alive?) end |
#wait ⇒ Array<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 |