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

Method new

src/thread_pool.rs:114–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112 Box<dyn Fn(Box<dyn Any + Send>) + Send + Sync + 'static>;
113
114/// A public interface that can be temporarily claimed and used by a thread.
115/// Claiming a seat allows a thread to participate in the thread pool as a
116/// worker.
117pub(crate) struct MemberData {
118 /// The sharing side of each seat's work-stealing queue. These should only
119 /// ever be accessed by the thread that currently owns the lease for this
120 /// seat (to ensure the `!Sync` bound is respected).
121 pub sharers: [Sharer<JobRef>; 32],
122 /// The stealing side of each seat's work-stealing queue.
123 pub stealers: [Stealer<JobRef>; 32],
124 /// A set of queues used for transmitting work that must be executed on a
125 /// particular worker. Used for broadcasts and cross-thread nonsend worker
126 /// wakeups.
127 pub broadcasts: [SegQueue<JobRef>; 32],
128 /// A binary semaphore for each seat, used for signaling.
129 pub semaphores: [CachePadded<Semaphore>; 32],
130}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected