Skip to content

Commit b21882f

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 164718 b: refs/heads/try c: 0fcd730 h: refs/heads/master v: v3
1 parent 0851369 commit b21882f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: f8f2c7a9537c7f333b242f616aefb75a83860927
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 8443b09e361b96d1f9b7f45a65ed0d31c0e86e70
5-
refs/heads/try: f91d87e6a03f4e64034ee8fa073ac8d47e71dc88
5+
refs/heads/try: 0fcd73037358b5f39276cf48f600299c44c7ccec
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/librustrt/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#![feature(macro_rules, phase, globs, thread_local, asm)]
2020
#![feature(linkage, lang_items, unsafe_destructor, default_type_params)]
2121
#![feature(import_shadowing, slicing_syntax)]
22+
#![feature(unboxed_closures)]
2223
#![no_std]
2324
#![experimental]
2425

branches/try/src/librustrt/task.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use core::atomic::{AtomicUint, SeqCst};
2222
use core::iter::{IteratorExt, Take};
2323
use core::kinds::marker;
2424
use core::mem;
25+
use core::ops::FnMut;
2526
use core::prelude::{Clone, Drop, Err, Iterator, None, Ok, Option, Send, Some};
2627
use core::prelude::{drop};
2728

@@ -297,9 +298,9 @@ impl Task {
297298
// `awoken` field which indicates whether we were actually woken up via some
298299
// invocation of `reawaken`. This flag is only ever accessed inside the
299300
// lock, so there's no need to make it atomic.
300-
pub fn deschedule(mut self: Box<Task>,
301-
times: uint,
302-
f: |BlockedTask| -> ::core::result::Result<(), BlockedTask>) {
301+
pub fn deschedule<F>(mut self: Box<Task>, times: uint, mut f: F) where
302+
F: FnMut(BlockedTask) -> ::core::result::Result<(), BlockedTask>,
303+
{
303304
unsafe {
304305
let me = &mut *self as *mut Task;
305306
let task = BlockedTask::block(self);

0 commit comments

Comments
 (0)