diff options
| author | Mica White <botahamec@outlook.com> | 2025-03-09 20:49:56 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2025-03-09 20:49:56 -0400 |
| commit | 58abf5872023aca7ee6459fa3b2e067d57923ba5 (patch) | |
| tree | 196cadda0dd4386668477ef286f9c9b09480e713 /src/thread.rs | |
| parent | 4ba03be97e6cc7e790bbc9bfc18caaa228c8a262 (diff) | |
Finish testing and fixing
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); |
