File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 77//! [arc]: struct.Arc.html
88
99use core:: any:: Any ;
10- use core:: sync:: atomic;
1110use core:: sync:: atomic:: Ordering :: { Acquire , Relaxed , Release , SeqCst } ;
1211use core:: borrow;
1312use core:: fmt;
@@ -29,6 +28,26 @@ use crate::rc::is_dangling;
2928use crate :: string:: String ;
3029use crate :: vec:: Vec ;
3130
31+ // Since the current `liballoc` is not a superset of `libcore`,
32+ // using `pub use core::sync::atomic;` will fail with some link errors.
33+ // If `liballoc` becomes a superset of `libcore`, replace this with
34+ // `pub use core::sync::atomic;`.
35+ /// Atomic types
36+ ///
37+ /// Atomic types provide primitive shared-memory communication between
38+ /// threads, and are the building blocks of other concurrent
39+ /// types.
40+ ///
41+ /// See [`std::sync::atomic`][atomic] for more details.
42+ ///
43+ /// [atomic]: ../../../std/sync/atomic/index.html
44+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
45+ pub mod atomic {
46+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
47+ #[ doc( inline) ]
48+ pub use core:: sync:: atomic:: * ;
49+ }
50+
3251/// A soft limit on the amount of references that may be made to an `Arc`.
3352///
3453/// Going above this limit will abort your program (although not
You can’t perform that action at this time.
0 commit comments