1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#![cfg_attr(not(any(feature = "std", test)), no_std)]
#![warn(missing_docs, missing_debug_implementations, unused_import_braces)]
#[cfg(feature = "alloc")]
extern crate alloc;
mod mutex;
mod queue;
mod rw_lock;
mod stack;
#[cfg(feature = "alloc")]
mod alloc_impls;
mod impls;
pub use mutex::*;
pub use queue::*;
pub use rw_lock::*;
pub use stack::*;
trait EnsureSend: Send {}
trait EnsureSync: Sync {}
pub trait ThreadSpawner {
type SpawnReturn;
type SpawnError;
fn spawn(
self,
function: impl FnOnce() + 'static + Send,
) -> Result<Self::SpawnReturn, Self::SpawnError>;
}