diff options
Diffstat (limited to 'src/thread.rs')
| -rw-r--r-- | src/thread.rs | 19 |
1 files changed, 19 insertions, 0 deletions
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<T>, + _phantom: PhantomData<&'scope ()>, +} + +pub struct JoinHandle<T> { + handle: std::thread::JoinHandle<T>, + key: crate::ThreadKey, +} + +pub struct ThreadBuilder(std::thread::Builder); |
