From 58abf5872023aca7ee6459fa3b2e067d57923ba5 Mon Sep 17 00:00:00 2001 From: Mica White Date: Sun, 9 Mar 2025 20:49:56 -0400 Subject: Finish testing and fixing --- src/thread.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/thread.rs (limited to 'src/thread.rs') diff --git a/src/thread.rs b/src/thread.rs new file mode 100644 index 0000000..6e9c270 --- /dev/null +++ b/src/thread.rs @@ -0,0 +1,19 @@ +use std::marker::PhantomData; + +mod scope; + +#[derive(Debug)] +pub struct Scope<'scope, 'env: 'scope>(PhantomData<(&'env (), &'scope ())>); + +#[derive(Debug)] +pub struct ScopedJoinHandle<'scope, T> { + handle: std::thread::JoinHandle, + _phantom: PhantomData<&'scope ()>, +} + +pub struct JoinHandle { + handle: std::thread::JoinHandle, + key: crate::ThreadKey, +} + +pub struct ThreadBuilder(std::thread::Builder); -- cgit v1.2.3