class Foo : Object {
	public async void bar () {
		new Thread<void*> (null, () => {
			Idle.add (bar.callback);
			return null;
		});

		yield;
	}
}

void main () {
	var loop = new MainLoop ();
	var foo = new Foo ();
	foo.bar.begin (() => {
		loop.quit ();
	});
	loop.run ();
}
