README added; main_loop example added.

This commit is contained in:
Kolan Sh 2013-03-28 18:45:57 +04:00
parent acfa130e92
commit 08abd67519
3 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1 @@
First look at https://live.gnome.org/Vala/Examples

View File

@ -0,0 +1,16 @@
void main() {
var loop = new MainLoop();
var time = new TimeoutSource(2000);
time.set_callback(() => {
stdout.printf("Time!\n");
loop.quit();
return false;
});
time.attach(loop.get_context());
loop.run();
}

View File

@ -6,3 +6,5 @@ valac --thread philosophers.vala
valac --thread async-queue-test.vala
valac --pkg gio-2.0 dbus-demo-service.vala
valac main_loop.vala