Re: [rust-dev] How to send a closure in a task

2013-12-25 Thread Philippe Delrieu
Thank you for your help. I test extern Rust fn(u64, T) and it works when I use a declared function. I didn't manage to make it works with a closure. For the 'static |u64, T| I have the same error : cannot capture variable of type `'static |u64, T|`, which does not fulfill `Send`, in a

[rust-dev] How to send a closure in a task

2013-12-24 Thread Philippe Delrieu
Hello, I try to capture a closure in a task and I have the error: error: cannot capture variable of type `|u64, T|`, which does not fulfill `Send`, in a bounded closure Any hint to make the closure 'send-able'? The code I use : pub fn Pt_startT:Send (resolution : u64, userData : T ,

Re: [rust-dev] How to send a closure in a task

2013-12-24 Thread Patrick Walton
On 12/24/13 3:41 AM, Philippe Delrieu wrote: Hello, I try to capture a closure in a task and I have the error: error: cannot capture variable of type `|u64, T|`, which does not fulfill `Send`, in a bounded closure Any hint to make the closure 'send-able'? Try `'static |u64, T|` or `extern