Skip to content

Commit bc507c4

Browse files
committed
Remove unneeded spawn in std::timer, and annotate a FIXME
1 parent 6969f0f commit bc507c4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/libstd/timer.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ for *at least* that period of time.
2525
"]
2626
fn delayed_send<T: copy send>(iotask: iotask,
2727
msecs: uint, ch: comm::chan<T>, val: T) {
28-
// FIME: Looks like we don't need to spawn here
29-
task::spawn() {||
3028
unsafe {
3129
let timer_done_po = comm::port::<()>();
3230
let timer_done_ch = comm::chan(timer_done_po);
@@ -59,7 +57,6 @@ fn delayed_send<T: copy send>(iotask: iotask,
5957
comm::send(ch, copy(val));
6058
// uv_close for this timer has been processed
6159
comm::recv(timer_done_po);
62-
}
6360
};
6461
}
6562

@@ -106,7 +103,7 @@ fn recv_timeout<T: copy send>(iotask: iotask,
106103
let timeout_po = comm::port::<()>();
107104
let timeout_ch = comm::chan(timeout_po);
108105
delayed_send(iotask, msecs, timeout_ch, ());
109-
// FIXME: This could be written clearer
106+
// FIXME: This could be written clearer (#2618)
110107
either::either(
111108
{|left_val|
112109
log(debug, #fmt("recv_time .. left_val %?",

0 commit comments

Comments
 (0)