MCPcopy Create free account
hub / github.com/Mic92/vmsh / InterrutableThread

Class InterrutableThread

src/interrutable_thread.rs:19–26  ·  view source on GitHub ↗

T: return value from the thread in the successful case C: resources shared with the threads that are returned to the the caller of join

Source from the content-addressed store, hash-verified

17/// T: return value from the thread in the successful case
18/// C: resources shared with the threads that are returned to the the caller of join
19pub struct InterrutableThread<T, C>
20where
21 T: Send + 'static,
22 C: Send + 'static,
23{
24 handle: JoinHandle<(Result<T>, C)>,
25 should_stop: Arc<AtomicBool>,
26}
27
28impl Debug for InterrutableThread<(), ()> {
29 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected