about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlaper Fesp <flaper87@gmail.com>2013-08-30 20:52:19 +0200
committerFlaper Fesp <flaper87@gmail.com>2013-09-04 01:12:23 +0200
commitb22861d16d6eae64134824485cc393ff0ee90c6a (patch)
tree31ba5e3b887c2e0ca4fcac19598d2f58ab20504c
parent3c4e943881fc93136c4b6ad80f23aead9fee9d1b (diff)
downloadrust-b22861d16d6eae64134824485cc393ff0ee90c6a.tar.gz
rust-b22861d16d6eae64134824485cc393ff0ee90c6a.zip
Rename MutexArc access methods to unsafe_access
-rw-r--r--src/libextra/arc.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libextra/arc.rs b/src/libextra/arc.rs
index 2ccbe396f8f..1021722d85e 100644
--- a/src/libextra/arc.rs
+++ b/src/libextra/arc.rs
@@ -214,7 +214,7 @@ impl<T:Send> MutexArc<T> {
      * blocked on the mutex) will also fail immediately.
      */
     #[inline]
-    pub unsafe fn access<U>(&self, blk: &fn(x: &mut T) -> U) -> U {
+    pub unsafe fn unsafe_access<U>(&self, blk: &fn(x: &mut T) -> U) -> U {
         let state = self.x.get();
         // Borrowck would complain about this if the function were
         // not already unsafe. See borrow_rwlock, far below.
@@ -227,7 +227,7 @@ impl<T:Send> MutexArc<T> {
 
     /// As access(), but with a condvar, as sync::mutex.lock_cond().
     #[inline]
-    pub unsafe fn access_cond<'x, 'c, U>(&self,
+    pub unsafe fn unsafe_access_cond<'x, 'c, U>(&self,
                                          blk: &fn(x: &'x mut T,
                                                   c: &'c Condvar) -> U)
                                          -> U {
@@ -597,12 +597,12 @@ mod tests {
             do task::spawn {
                 // wait until parent gets in
                 p.take().recv();
-                do arc2.access_cond |state, cond| {
+                do arc2.unsafe_access_cond |state, cond| {
                     *state = true;
                     cond.signal();
                 }
             }
-            do arc.access_cond |state, cond| {
+            do arc.unsafe_access_cond |state, cond| {
                 c.take().send(());
                 assert!(!*state);
                 while !*state {
@@ -621,14 +621,14 @@ mod tests {
 
             do task::spawn_unlinked {
                 let _ = p.recv();
-                do arc2.access_cond |one, cond| {
+                do arc2.unsafe_access_cond |one, cond| {
                     cond.signal();
                     // Parent should fail when it wakes up.
                     assert_eq!(*one, 0);
                 }
             }
 
-            do arc.access_cond |one, cond| {
+            do arc.unsafe_access_cond |one, cond| {
                 c.send(());
                 while *one == 1 {
                     cond.wait();
@@ -642,11 +642,11 @@ mod tests {
             let arc = MutexArc::new(1);
             let arc2 = arc.clone();
             do task::try {
-                do arc2.access |one| {
+                do arc2.unsafe_access |one| {
                     assert_eq!(*one, 2);
                 }
             };
-            do arc.access |one| {
+            do arc.unsafe_access |one| {
                 assert_eq!(*one, 1);
             }
         }
@@ -658,7 +658,7 @@ mod tests {
         let (p, c) = comm::stream();
         do task::spawn {
             unsafe {
-                do arc2.access |one| {
+                do arc2.unsafe_access |one| {
                     c.send(());
                     assert!(*one == 2);
                 }