MCPcopy Create free account
hub / github.com/NthTensor/Forte / execute_runnable

Function execute_runnable

src/thread_pool.rs:533–543  ·  view source on GitHub ↗
(this: NonNull<()>, _worker: &Worker)

Source from the content-addressed store, hash-verified

531/// with inferred types. If you encounter the following:
532///
533/// ```compile_fail
534/// # use forte::ThreadPool;
535/// # use forte::Worker;
536/// # static THREAD_POOL: ThreadPool = ThreadPool::new();
537/// THREAD_POOL.spawn(|_| { });
538/// // ^^^^^^^ ERROR: the trait `Spawn<'_, _>` is not implemented for closure ...
539/// ```
540/// Try adding a type hint to the closure's parameters, like so:
541/// ```
542/// # use forte::ThreadPool;
543/// # use forte::Worker;
544/// # static THREAD_POOL: ThreadPool = ThreadPool::new();
545/// THREAD_POOL.spawn(|_: &Worker| { });
546/// ```

Callers

nothing calls this directly

Calls 1

runMethod · 0.80

Tested by

no test coverage detected