[Vala] Can't create a GLib.Thread



Hi I've been try to understand how handling sockets in Vala. So I try to
run the example on Glib.SocketListenere.accept - gio-2.0 on
valadoc.org[1]

But I got this 
        error: The name `try' does not exist in the context of `GLib.Thread'

The issue is this line 
        new Thread<int>.try (null, () => { return worker.run (); });

I've been search the web, but nothig. I don't known GLib.Threads,
either.

I'm on Arch i686, and with vala-20.1

Bye bye! Thanks!

[1] http://www.valadoc.org/#!api=gio-2.0/GLib.SocketListener.accept



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]