[Vala] async method and delegate



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





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]