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 bounded closure

The function signature :
pub fn Pt_start<T:Send> (&self, resolution : u64, userData : T , callback: 'static |u64, &T|) {

Philippe

Le 24/12/2013 19:06, Patrick Walton a écrit :
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 "Rust" fn(u64, T)`.

Patrick

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev



_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to