Class: LLM::Function::CallTask
- Inherits:
-
Object
- Object
- LLM::Function::CallTask
- Defined in:
- lib/llm/function/call_task.rb
Overview
The CallTask class wraps a single direct function call behind the same task-like interface used by spawned concurrency modes.
Instance Attribute Summary collapse
- #function ⇒ LLM::Function readonly
Instance Method Summary collapse
- #alive? ⇒ Boolean
- #group_class ⇒ Class
- #initialize(function) ⇒ LLM::Function::CallTask constructor
- #interrupt! ⇒ nil (also: #cancel!)
- #wait ⇒ LLM::Function::Return (also: #value)
Constructor Details
#initialize(function) ⇒ LLM::Function::CallTask
15 16 17 |
# File 'lib/llm/function/call_task.rb', line 15 def initialize(function) @function = function end |
Instance Attribute Details
#function ⇒ LLM::Function (readonly)
10 11 12 |
# File 'lib/llm/function/call_task.rb', line 10 def function @function end |
Instance Method Details
#alive? ⇒ Boolean
21 22 23 |
# File 'lib/llm/function/call_task.rb', line 21 def alive? false end |
#group_class ⇒ Class
42 43 44 |
# File 'lib/llm/function/call_task.rb', line 42 def group_class LLM::Function::TaskGroup end |
#interrupt! ⇒ nil Also known as: cancel!
27 28 29 30 |
# File 'lib/llm/function/call_task.rb', line 27 def interrupt! function.interrupt! nil end |
#wait ⇒ LLM::Function::Return Also known as: value
35 36 37 |
# File 'lib/llm/function/call_task.rb', line 35 def wait function.call end |