about summary refs log tree commit diff
path: root/src/libstd/thread_local
diff options
context:
space:
mode:
authorFlavio Percoco <flaper87@gmail.com>2014-12-22 12:29:46 +0100
committerFlavio Percoco <flaper87@gmail.com>2014-12-26 17:26:33 +0100
commite2116c8fba6e73bc2bbf7cb6bb41911d4daed043 (patch)
tree5484f1e0a4b7dfad3f2a363e5db1a39c9b50ccc9 /src/libstd/thread_local
parentf436f9ca2963e33cc41802370bb9c551c833970e (diff)
downloadrust-e2116c8fba6e73bc2bbf7cb6bb41911d4daed043.tar.gz
rust-e2116c8fba6e73bc2bbf7cb6bb41911d4daed043.zip
Move RacyCell to `std::comm`
RacyCell is not exactly what we'd like as a final implementation for
this. Therefore, we're moving it under `std::comm` and also making it
private.
Diffstat (limited to 'src/libstd/thread_local')
-rw-r--r--src/libstd/thread_local/scoped.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libstd/thread_local/scoped.rs b/src/libstd/thread_local/scoped.rs
index d7ea163cc80..3ea051b16f2 100644
--- a/src/libstd/thread_local/scoped.rs
+++ b/src/libstd/thread_local/scoped.rs
@@ -196,11 +196,10 @@ impl<T> Key<T> {
 
 #[cfg(not(any(windows, target_os = "android", target_os = "ios")))]
 mod imp {
-    use std::cell::UnsafeCell;
+    use std::comm::RacyCell;
 
-    // SNAP c9f6d69 switch to `Cell`
     #[doc(hidden)]
-    pub struct KeyInner<T> { pub inner: UnsafeCell<*mut T> }
+    pub struct KeyInner<T> { pub inner: RacyCell<*mut T> }
 
     unsafe impl<T> ::kinds::Sync for KeyInner<T> { }