File tree 1 file changed +20
-1
lines changed
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 7
7
//! [arc]: struct.Arc.html
8
8
9
9
use core:: any:: Any ;
10
- use core:: sync:: atomic;
11
10
use core:: sync:: atomic:: Ordering :: { Acquire , Relaxed , Release , SeqCst } ;
12
11
use core:: borrow;
13
12
use core:: fmt;
@@ -29,6 +28,26 @@ use crate::rc::is_dangling;
29
28
use crate :: string:: String ;
30
29
use crate :: vec:: Vec ;
31
30
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
+
32
51
/// A soft limit on the amount of references that may be made to an `Arc`.
33
52
///
34
53
/// Going above this limit will abort your program (although not
You can’t perform that action at this time.
0 commit comments