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

Method try_enroll

src/thread_pool.rs:802–824  ·  view source on GitHub ↗
(&'static self)

Source from the content-addressed store, hash-verified

800 unsafe { storage.release() };
801 // Panics may not unwind out of the job, so are sent to the thread pool's
802 // handler.
803 if let Err(payload) = result {
804 worker.thread_pool.handle_panic(payload);
805 }
806}
807
808// -----------------------------------------------------------------------------
809// Broadcasts
810
811/// Context object for [`broadcast`](Worker::broadcast) operations.
812pub struct Broadcast<'w> {
813 /// The worker this part of the broadcast is running on. This will be in
814 /// `[0, participants)`.
815 pub worker: &'w Worker,
816 /// The index of this worker within the broadcast. The return value will be
817 /// stored at this index within the results vector.
818 pub index: usize,
819 /// The number of threads participating in the broadcast.
820 pub participants: usize,
821}
822
823// -----------------------------------------------------------------------------
824// Thread pool operations
825
826impl ThreadPool {
827 /// Spawns a job into the thread pool.

Callers 1

enrollMethod · 0.80

Calls 1

get_member_dataMethod · 0.80

Tested by

no test coverage detected