pub trait AsyncExecutor:
Send
+ Sync
+ 'static {
// Required methods
fn execute(&self, job: AsyncJob) -> Result<(), AsyncExecuteError>;
fn shutdown(&self);
}Expand description
Runtime-neutral submission surface installed by an XLL application.
Each executor belongs to exactly one runtime generation. execute must
either accept the closure exactly once or return it without running it.
shutdown establishes an irreversible rejection boundary, waits until all
accepted closures can no longer execute XLL code, and is idempotent. It must
not detach work that can outlive XLL unload. The runtime never invokes
shutdown from one of the executor’s jobs; third-party implementations that
permit that case must document it themselves. execute must not run the job
synchronously or wait for the job to finish before returning: controller
admission remains locked until acceptance commits.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".