Skip to content

Commit 0738b3c

Browse files
authored
Merge pull request #238 from japaric/arc-pool
add Arc pointer backed by a memory pool
2 parents 05c21c4 + 6e8e26c commit 0738b3c

File tree

3 files changed

+396
-0
lines changed

3 files changed

+396
-0
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
//!
4444
//! List of currently implemented data structures:
4545
//!
46+
//! - [`Arc`](pool/singleton/arc/struct.Arc.html) -- Thread-safe reference-counting pointer backed by a memory pool
4647
//! - [`BinaryHeap`](binary_heap/struct.BinaryHeap.html) -- priority queue
4748
//! - [`IndexMap`](struct.IndexMap.html) -- hash table
4849
//! - [`IndexSet`](struct.IndexSet.html) -- hash set
@@ -79,6 +80,8 @@ pub use histbuf::HistoryBuffer;
7980
pub use indexmap::{Bucket, FnvIndexMap, IndexMap, Pos};
8081
pub use indexset::{FnvIndexSet, IndexSet};
8182
pub use linear_map::LinearMap;
83+
#[cfg(all(has_cas, feature = "cas"))]
84+
pub use pool::singleton::arc::Arc;
8285
pub use string::String;
8386
pub use vec::Vec;
8487

src/pool/singleton.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ use core::{
1212

1313
use super::{Init, Node, Uninit};
1414

15+
pub mod arc;
16+
1517
/// Instantiates a pool as a global singleton
1618
// NOTE(any(test)) makes testing easier (no need to enable Cargo features for testing)
1719
#[cfg(any(

0 commit comments

Comments
 (0)