using NM;

namespace AsyncInitDemo {

    void main() {
        var main_loop = new MainLoop();
        Client.new_async.begin(null, (obj, res) => {
            try {
                var client = Client.new_async.end(res);
                message("Successfully got client");
            } catch (Error err) {
                critical("%s", err.message);
            }
            main_loop.quit();
        });
        main_loop.run();
    }
}
