gdk-3.0: Atom is an IntegerType
[vala-gnome.git] / tests / asynchronous / bug741929.vala
blobb7818231f1393f1445a4663ba6cf2ed7cbdfe3ce
1 MainLoop? loop = null;
3 class Foo : Object {
4 bool running = false;
6 public Foo () {
9 public async void query_async () throws Error {
10 running = true;
12 try {
13 if (!yield internal_query_async ()) {
14 return;
16 } finally {
17 try {
18 yield close_query_async ();
19 } catch (Error e) {
20 // ignored
23 running = false;
27 async bool internal_query_async () throws Error {
28 return true;
31 async void close_query_async () throws Error {
35 async void go_async () {
36 Foo foo = new Foo ();
37 try {
38 yield foo.query_async ();
39 } catch (Error e) {
42 loop.quit ();
45 void main () {
46 loop = new MainLoop ();
47 go_async.begin ();
48 loop.run ();