Re: [Vala] async method and delegate
- From: Jim Nelson <jim yorba org>
- To: Nor Jaidi Tuah <norjaidi tuah ubd edu bn>
- Cc: vala-list gnome org
- Subject: Re: [Vala] async method and delegate
- Date: Mon, 20 Jun 2011 13:06:50 -0700
Regarding copying delegates, it is intentional. The Vala Journal has a nice
write-up about ways to work around the problem:
http://valajournal.blogspot.com/2011/06/vala-0130-released.html
-- Jim
On Sun, Jun 19, 2011 at 9:20 PM, Nor Jaidi Tuah <norjaidi tuah ubd edu bn>wrote:
valac version: 0.13.0
When an async method accepts a delegate as its
argument, I get the warning "copying delegates is discouraged".
Is this intended?
I also get segmentation fault trying to pass
a closure accessing local variables. The closure
works if it doesn't access local vars.
e.g.,
var f = etc;
async_func ( () => { fn (f);} );
will crash trying to access f. Apparently
the closure isn't properly constructed.
Is this a known bug? Any simple workaround?
hand
Nor Jaidi Tuah
_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]