| 1 | #[cfg(target_family = "wasm")] |
| 2 | #[doc(hidden)] |
| 3 | pub trait ThreadBound {} |
| 4 | |
| 5 | #[cfg(target_family = "wasm")] |
| 6 | impl<T: ?Sized> ThreadBound for T {} |
| 7 | |
| 8 | #[cfg(not(target_family = "wasm"))] |
| 9 | #[doc(hidden)] |
| 10 | pub trait ThreadBound: Send + Sync {} |
| 11 | |
| 12 | #[cfg(not(target_family = "wasm"))] |
| 13 | impl<T: ?Sized + Send + Sync> ThreadBound for T {} |
| 14 | |
| 15 | #[cfg(target_family = "wasm")] |
| 16 | pub(crate) type Shared<T> = std::rc::Rc<T>; |
| 17 | #[cfg(not(target_family = "wasm"))] |
| 18 | pub(crate) type Shared<T> = std::sync::Arc<T>; |
| 19 | |
| 20 | #[cfg(target_family = "wasm")] |
| 21 | pub(crate) type SharedWeak<T> = std::rc::Weak<T>; |
| 22 | #[cfg(not(target_family = "wasm"))] |
| 23 | pub(crate) type SharedWeak<T> = std::sync::Weak<T>; |