Skip to content

Commit 1cb78e7

Browse files
committed
core::rt: Rename block_running_task_and_then to deschedul_...
1 parent 8e96621 commit 1cb78e7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/libcore/rt/sched.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ pub impl Scheduler {
195195
/// The closure here is a *stack* closure that lives in the
196196
/// running task. It gets transmuted to the scheduler's lifetime
197197
/// and called while the task is blocked.
198-
fn block_running_task_and_then(&mut self, f: &fn(&mut Scheduler, ~Task)) {
198+
fn deschedule_running_task_and_then(&mut self, f: &fn(&mut Scheduler, ~Task)) {
199199
assert!(self.in_task_context());
200200

201201
rtdebug!("blocking task");
@@ -566,7 +566,7 @@ fn test_block_task() {
566566
let task = ~do Task::new(&mut sched.stack_pool) {
567567
do Scheduler::local |sched| {
568568
assert!(sched.in_task_context());
569-
do sched.block_running_task_and_then() |sched, task| {
569+
do sched.deschedule_running_task_and_then() |sched, task| {
570570
assert!(!sched.in_task_context());
571571
sched.task_queue.push_back(task);
572572
}

src/libcore/rt/uvio.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl IoFactory for UvIoFactory {
108108
assert!(scheduler.in_task_context());
109109

110110
// Block this task and take ownership, switch to scheduler context
111-
do scheduler.block_running_task_and_then |scheduler, task| {
111+
do scheduler.deschedule_running_task_and_then |scheduler, task| {
112112

113113
rtdebug!("connect: entered scheduler context");
114114
assert!(!scheduler.in_task_context());
@@ -181,7 +181,7 @@ impl TcpListener for UvTcpListener {
181181
do Scheduler::local |scheduler| {
182182
assert!(scheduler.in_task_context());
183183

184-
do scheduler.block_running_task_and_then |_, task| {
184+
do scheduler.deschedule_running_task_and_then |_, task| {
185185
let task_cell = Cell(task);
186186
let mut server_tcp_watcher = server_tcp_watcher;
187187
do server_tcp_watcher.listen |server_stream_watcher, status| {
@@ -247,7 +247,7 @@ impl Stream for UvStream {
247247
assert!(scheduler.in_task_context());
248248
let watcher = self.watcher();
249249
let buf_ptr: *&mut [u8] = &buf;
250-
do scheduler.block_running_task_and_then |scheduler, task| {
250+
do scheduler.deschedule_running_task_and_then |scheduler, task| {
251251
rtdebug!("read: entered scheduler context");
252252
assert!(!scheduler.in_task_context());
253253
let mut watcher = watcher;
@@ -293,7 +293,7 @@ impl Stream for UvStream {
293293
assert!(scheduler.in_task_context());
294294
let watcher = self.watcher();
295295
let buf_ptr: *&[u8] = &buf;
296-
do scheduler.block_running_task_and_then |_, task| {
296+
do scheduler.deschedule_running_task_and_then |_, task| {
297297
let mut watcher = watcher;
298298
let task_cell = Cell(task);
299299
let buf = unsafe { &*buf_ptr };
@@ -420,7 +420,7 @@ fn test_read_and_block() {
420420
// Yield to the other task in hopes that it
421421
// will trigger a read callback while we are
422422
// not ready for it
423-
do scheduler.block_running_task_and_then |scheduler, task| {
423+
do scheduler.deschedule_running_task_and_then |scheduler, task| {
424424
scheduler.task_queue.push_back(task);
425425
}
426426
}

0 commit comments

Comments
 (0)