about summary refs log tree commit diff
path: root/src/libstd/task
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-10-21 13:08:31 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-10-22 08:09:56 -0700
commitdaf5f5a4d10513ff42e79fa7ef8819b170f3a13d (patch)
tree7a07a79c43e02debcc6bbb33d90a5e41b70119e6 /src/libstd/task
parent15a6bdebab4e7b811b9a902e3f8ed225c59af06e (diff)
downloadrust-daf5f5a4d10513ff42e79fa7ef8819b170f3a13d.tar.gz
rust-daf5f5a4d10513ff42e79fa7ef8819b170f3a13d.zip
Drop the '2' suffix from logging macros
Who doesn't like a massive renaming?
Diffstat (limited to 'src/libstd/task')
-rw-r--r--src/libstd/task/mod.rs54
-rw-r--r--src/libstd/task/spawn.rs12
2 files changed, 33 insertions, 33 deletions
diff --git a/src/libstd/task/mod.rs b/src/libstd/task/mod.rs
index 51b1ab603ed..970a62b676f 100644
--- a/src/libstd/task/mod.rs
+++ b/src/libstd/task/mod.rs
@@ -192,7 +192,7 @@ pub fn task() -> TaskBuilder {
 impl TaskBuilder {
     fn consume(&mut self) -> TaskBuilder {
         if self.consumed {
-            fail2!("Cannot copy a task_builder"); // Fake move mode on self
+            fail!("Cannot copy a task_builder"); // Fake move mode on self
         }
         self.consumed = true;
         let gen_body = self.gen_body.take();
@@ -280,7 +280,7 @@ impl TaskBuilder {
         // sending out messages.
 
         if self.opts.notify_chan.is_some() {
-            fail2!("Can't set multiple future_results for one task!");
+            fail!("Can't set multiple future_results for one task!");
         }
 
         // Construct the future and give it to the caller.
@@ -540,7 +540,7 @@ pub fn with_task_name<U>(blk: &fn(Option<&str>) -> U) -> U {
             }
         }
     } else {
-        fail2!("no task name exists in non-green task context")
+        fail!("no task name exists in non-green task context")
     }
 }
 
@@ -648,7 +648,7 @@ fn test_kill_unkillable_task() {
     do run_in_newsched_task {
         do task::try {
             do task::spawn {
-                fail2!();
+                fail!();
             }
             do task::unkillable { }
         };
@@ -667,7 +667,7 @@ fn test_kill_rekillable_task() {
             do task::unkillable {
                 do task::rekillable {
                     do task::spawn {
-                        fail2!();
+                        fail!();
                     }
                 }
             }
@@ -697,7 +697,7 @@ fn test_rekillable_nested_failure() {
         do unkillable {
             do rekillable {
                 let (port,chan) = comm::stream();
-                do task::spawn { chan.send(()); fail2!(); }
+                do task::spawn { chan.send(()); fail!(); }
                 port.recv(); // wait for child to exist
                 port.recv(); // block forever, expect to get killed.
             }
@@ -741,7 +741,7 @@ fn test_spawn_unlinked_unsup_no_fail_down() { // grandchild sends on a port
                 do 16.times { task::deschedule(); }
                 ch.send(()); // If killed first, grandparent hangs.
             }
-            fail2!(); // Shouldn't kill either (grand)parent or (grand)child.
+            fail!(); // Shouldn't kill either (grand)parent or (grand)child.
         }
         po.recv();
     }
@@ -751,7 +751,7 @@ fn test_spawn_unlinked_unsup_no_fail_down() { // grandchild sends on a port
 fn test_spawn_unlinked_unsup_no_fail_up() { // child unlinked fails
     use rt::test::run_in_newsched_task;
     do run_in_newsched_task {
-        do spawn_unlinked { fail2!(); }
+        do spawn_unlinked { fail!(); }
     }
 }
 #[ignore(reason = "linked failure")]
@@ -759,7 +759,7 @@ fn test_spawn_unlinked_unsup_no_fail_up() { // child unlinked fails
 fn test_spawn_unlinked_sup_no_fail_up() { // child unlinked fails
     use rt::test::run_in_newsched_task;
     do run_in_newsched_task {
-        do spawn_supervised { fail2!(); }
+        do spawn_supervised { fail!(); }
         // Give child a chance to fail-but-not-kill-us.
         do 16.times { task::deschedule(); }
     }
@@ -771,7 +771,7 @@ fn test_spawn_unlinked_sup_fail_down() {
     do run_in_newsched_task {
         let result: Result<(),()> = do try {
             do spawn_supervised { block_forever(); }
-            fail2!(); // Shouldn't leave a child hanging around.
+            fail!(); // Shouldn't leave a child hanging around.
         };
         assert!(result.is_err());
     }
@@ -791,7 +791,7 @@ fn test_spawn_linked_sup_fail_up() { // child fails; parent fails
             b0.opts.supervised = true;
 
             do b0.spawn {
-                fail2!();
+                fail!();
             }
             block_forever(); // We should get punted awake
         };
@@ -810,7 +810,7 @@ fn test_spawn_linked_sup_fail_down() { // parent fails; child fails
             b0.opts.linked = true;
             b0.opts.supervised = true;
             do b0.spawn { block_forever(); }
-            fail2!(); // *both* mechanisms would be wrong if this didn't kill the child
+            fail!(); // *both* mechanisms would be wrong if this didn't kill the child
         };
         assert!(result.is_err());
     }
@@ -822,7 +822,7 @@ fn test_spawn_linked_unsup_fail_up() { // child fails; parent fails
     do run_in_newsched_task {
         let result: Result<(),()> = do try {
             // Default options are to spawn linked & unsupervised.
-            do spawn { fail2!(); }
+            do spawn { fail!(); }
             block_forever(); // We should get punted awake
         };
         assert!(result.is_err());
@@ -836,7 +836,7 @@ fn test_spawn_linked_unsup_fail_down() { // parent fails; child fails
         let result: Result<(),()> = do try {
             // Default options are to spawn linked & unsupervised.
             do spawn { block_forever(); }
-            fail2!();
+            fail!();
         };
         assert!(result.is_err());
     }
@@ -851,7 +851,7 @@ fn test_spawn_linked_unsup_default_opts() { // parent fails; child fails
             let mut builder = task();
             builder.linked();
             do builder.spawn { block_forever(); }
-            fail2!();
+            fail!();
         };
         assert!(result.is_err());
     }
@@ -871,7 +871,7 @@ fn test_spawn_failure_propagate_grandchild() {
                 do spawn_supervised { block_forever(); }
             }
             do 16.times { task::deschedule(); }
-            fail2!();
+            fail!();
         };
         assert!(result.is_err());
     }
@@ -888,7 +888,7 @@ fn test_spawn_failure_propagate_secondborn() {
                 do spawn { block_forever(); } // linked
             }
             do 16.times { task::deschedule(); }
-            fail2!();
+            fail!();
         };
         assert!(result.is_err());
     }
@@ -905,7 +905,7 @@ fn test_spawn_failure_propagate_nephew_or_niece() {
                 do spawn_supervised { block_forever(); }
             }
             do 16.times { task::deschedule(); }
-            fail2!();
+            fail!();
         };
         assert!(result.is_err());
     }
@@ -922,7 +922,7 @@ fn test_spawn_linked_sup_propagate_sibling() {
                 do spawn { block_forever(); } // linked
             }
             do 16.times { task::deschedule(); }
-            fail2!();
+            fail!();
         };
         assert!(result.is_err());
     }
@@ -1030,7 +1030,7 @@ fn test_future_result() {
     let result = builder.future_result();
     builder.unlinked();
     do builder.spawn {
-        fail2!();
+        fail!();
     }
     assert_eq!(result.recv(), Failure);
 }
@@ -1048,17 +1048,17 @@ fn test_try_success() {
         ~"Success!"
     } {
         result::Ok(~"Success!") => (),
-        _ => fail2!()
+        _ => fail!()
     }
 }
 
 #[test]
 fn test_try_fail() {
     match do try {
-        fail2!()
+        fail!()
     } {
         result::Err(()) => (),
-        result::Ok(()) => fail2!()
+        result::Ok(()) => fail!()
     }
 }
 
@@ -1248,7 +1248,7 @@ fn test_unkillable() {
         deschedule();
         // We want to fail after the unkillable task
         // blocks on recv
-        fail2!();
+        fail!();
     }
 
     unsafe {
@@ -1283,7 +1283,7 @@ fn test_unkillable_nested() {
         deschedule();
         // We want to fail after the unkillable task
         // blocks on recv
-        fail2!();
+        fail!();
     }
 
     unsafe {
@@ -1348,7 +1348,7 @@ fn test_spawn_watched() {
                 t.watched();
                 do t.spawn {
                     task::deschedule();
-                    fail2!();
+                    fail!();
                 }
             }
         };
@@ -1384,7 +1384,7 @@ fn test_indestructible() {
                 do t.spawn {
                     p3.recv();
                     task::deschedule();
-                    fail2!();
+                    fail!();
                 }
                 c3.send(());
                 p2.recv();
diff --git a/src/libstd/task/spawn.rs b/src/libstd/task/spawn.rs
index 611d2f1fdb6..7cf0f04c7e9 100644
--- a/src/libstd/task/spawn.rs
+++ b/src/libstd/task/spawn.rs
@@ -631,7 +631,7 @@ pub fn spawn_raw(mut opts: TaskOpts, f: ~fn()) {
             let (thread_port, thread_chan) = oneshot();
             let thread_port_cell = Cell::new(thread_port);
             let join_task = do Task::build_child(None) {
-                debug2!("running join task");
+                debug!("running join task");
                 let thread_port = thread_port_cell.take();
                 let thread: Thread = thread_port.recv();
                 thread.join();
@@ -648,11 +648,11 @@ pub fn spawn_raw(mut opts: TaskOpts, f: ~fn()) {
                 let join_task = join_task_cell.take();
 
                 let bootstrap_task = ~do Task::new_root(&mut new_sched.stack_pool, None) || {
-                    debug2!("boostrapping a 1:1 scheduler");
+                    debug!("boostrapping a 1:1 scheduler");
                 };
                 new_sched.bootstrap(bootstrap_task);
 
-                debug2!("enqueing join_task");
+                debug!("enqueing join_task");
                 // Now tell the original scheduler to join with this thread
                 // by scheduling a thread-joining task on the original scheduler
                 orig_sched_handle.send_task_from_friend(join_task);
@@ -684,7 +684,7 @@ pub fn spawn_raw(mut opts: TaskOpts, f: ~fn()) {
     }
 
     task.name = opts.name.take();
-    debug2!("spawn calling run_task");
+    debug!("spawn calling run_task");
     Scheduler::run_task(task);
 
 }
@@ -707,7 +707,7 @@ fn test_spawn_raw_unsupervise() {
         .. default_task_opts()
     };
     do spawn_raw(opts) {
-        fail2!();
+        fail!();
     }
 }
 
@@ -736,7 +736,7 @@ fn test_spawn_raw_notify_failure() {
         .. default_task_opts()
     };
     do spawn_raw(opts) {
-        fail2!();
+        fail!();
     }
     assert_eq!(notify_po.recv(), Failure);
 }