Class: LLM::Function::Sequential::Task
- Inherits:
-
Task
- Object
- Task
- LLM::Function::Sequential::Task
show all
- Defined in:
- lib/llm/function/sequential/task.rb
Overview
The Task class wraps a single
direct function call behind the same task-like interface
used by spawned concurrency modes.
Instance Attribute Summary
Attributes inherited from Task
#function
Instance Method Summary
collapse
Methods inherited from Task
#initialize
Instance Method Details
#alive? ⇒ Boolean
17
18
19
|
# File 'lib/llm/function/sequential/task.rb', line 17
def alive?
false
end
|
#interrupt! ⇒ nil
Also known as:
cancel!
23
24
25
26
|
# File 'lib/llm/function/sequential/task.rb', line 23
def interrupt!
function.interrupt!
nil
end
|
#spawn ⇒ nil
11
12
13
|
# File 'lib/llm/function/sequential/task.rb', line 11
def spawn
end
|
31
32
33
|
# File 'lib/llm/function/sequential/task.rb', line 31
def wait
@result ||= @guarded || function.call
end
|