Class: Extism::CancelHandle
- Inherits:
-
Object
- Object
- Extism::CancelHandle
- Defined in:
- lib/extism/wasm.rb
Overview
A CancelHandle can be used to cancel a running plugin from another thread
Instance Method Summary collapse
-
#cancel ⇒ Object
Cancel the plugin used to generate the handle.
-
#initialize(handle) ⇒ CancelHandle
constructor
A new instance of CancelHandle.
Constructor Details
#initialize(handle) ⇒ CancelHandle
Returns a new instance of CancelHandle.
52 53 54 |
# File 'lib/extism/wasm.rb', line 52 def initialize(handle) @handle = handle end |
Instance Method Details
#cancel ⇒ Object
Cancel the plugin used to generate the handle
57 58 59 |
# File 'lib/extism/wasm.rb', line 57 def cancel LibExtism.extism_plugin_cancel(@handle) end |