pub struct ScriptWorkers(/* private fields */);Expand description
A small dedicated CPU pool. Waiting host calls yield within a LocalSet; request saturation cannot consume the separate hook admission capacity. Admission is fail-fast, including hooks, so recursive hooks never wait forever for a slot held by their caller. Capacity is released after actual worker cleanup.
Implementations§
Source§impl ScriptWorkers
impl ScriptWorkers
Sourcepub fn new(config: WorkerConfig) -> Result<Self, ScriptError>
pub fn new(config: WorkerConfig) -> Result<Self, ScriptError>
Create at service startup and share across Integration and Automation calls.
pub async fn invoke( &self, source: Arc<str>, args: Vec<ScriptValue>, host: Arc<dyn ScriptHost>, control: InvocationControl, limits: ScriptLimits, admission: Admission, ) -> Result<ScriptValue, ScriptError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScriptWorkers
impl RefUnwindSafe for ScriptWorkers
impl Send for ScriptWorkers
impl Sync for ScriptWorkers
impl Unpin for ScriptWorkers
impl UnsafeUnpin for ScriptWorkers
impl UnwindSafe for ScriptWorkers
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more