Re: [Vala] async method and delegate
- From: Nor Jaidi Tuah <norjaidi tuah ubd edu bn>
- To: <vala-list gnome org>
- Subject: Re: [Vala] async method and delegate
- Date: Tue, 21 Jun 2011 08:26:02 +0800
On Mon, 2011-06-20 at 13:06 -0700, Jim Nelson wrote:
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
This is not about copying delegates. Consider the
example in the vala tutorial:
delegate void DelegateType(int a);
void f1(int a) {
stdout.printf("%d\n", a);
}
void f2(DelegateType d, int a) {
d(a); // Calling a delegate
}
void main() {
f2(f1, 5);
}
This example compiles with no problem. But if we make
f2 async, i.e.,
async void f2(DelegateType d, int a) {
d(a); // Calling a delegate
}
the warning appears.
hand
Nor Jaidi Tuah
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]