diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-01-30 14:28:28 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-02-03 09:32:35 -0800 |
| commit | ae581a010363b26ef6bae60145ebd17343a343b0 (patch) | |
| tree | a5fb5e0ddfb26e90129f9ca91ecbc21e4505e142 /src/libnative/task.rs | |
| parent | 41cde566bb81bdd5f9ffdefadc7c8256c65624dc (diff) | |
| download | rust-ae581a010363b26ef6bae60145ebd17343a343b0.tar.gz rust-ae581a010363b26ef6bae60145ebd17343a343b0.zip | |
native: Require all results are used and fix fallout
Diffstat (limited to 'src/libnative/task.rs')
| -rw-r--r-- | src/libnative/task.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libnative/task.rs b/src/libnative/task.rs index 37425179701..0def5cb4053 100644 --- a/src/libnative/task.rs +++ b/src/libnative/task.rs @@ -103,7 +103,8 @@ pub fn spawn_opts(opts: TaskOpts, f: proc()) { let mut f = Some(f); let mut task = task; task.put_runtime(ops as ~rt::Runtime); - task.run(|| { f.take_unwrap()() }); + let t = task.run(|| { f.take_unwrap()() }); + drop(t); bookkeeping::decrement(); }) } |
