diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-06-14 19:01:12 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-06-14 19:09:02 -0700 |
| commit | bc507c4ef5a5e4da95e95c080239dbe10ffcd376 (patch) | |
| tree | cba90f9f343b4fd2905c3faf8b8e1fc3b31f3e83 | |
| parent | 6969f0f2fcd4441f694344bdd8d6f10aa9fc56ef (diff) | |
| download | rust-bc507c4ef5a5e4da95e95c080239dbe10ffcd376.tar.gz rust-bc507c4ef5a5e4da95e95c080239dbe10ffcd376.zip | |
Remove unneeded spawn in std::timer, and annotate a FIXME
| -rw-r--r-- | src/libstd/timer.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libstd/timer.rs b/src/libstd/timer.rs index 9fdf6c8550a..3ee92e5f074 100644 --- a/src/libstd/timer.rs +++ b/src/libstd/timer.rs @@ -25,8 +25,6 @@ for *at least* that period of time. "] fn delayed_send<T: copy send>(iotask: iotask, msecs: uint, ch: comm::chan<T>, val: T) { - // FIME: Looks like we don't need to spawn here - task::spawn() {|| unsafe { let timer_done_po = comm::port::<()>(); let timer_done_ch = comm::chan(timer_done_po); @@ -59,7 +57,6 @@ fn delayed_send<T: copy send>(iotask: iotask, comm::send(ch, copy(val)); // uv_close for this timer has been processed comm::recv(timer_done_po); - } }; } @@ -106,7 +103,7 @@ fn recv_timeout<T: copy send>(iotask: iotask, let timeout_po = comm::port::<()>(); let timeout_ch = comm::chan(timeout_po); delayed_send(iotask, msecs, timeout_ch, ()); - // FIXME: This could be written clearer + // FIXME: This could be written clearer (#2618) either::either( {|left_val| log(debug, #fmt("recv_time .. left_val %?", |
