[Vala] Deriving classes from GLib.Thread



Hi,

I am trying to add some functionality (e.g. an is_alive-method) to the
GLib.Thread class, but with the following code:

class MThread<T> : GLib.Thread<T> {
        public MThread(string? name, ThreadFunc<T> func) {
                base(name, func);
        }

        public MThread.try(string? name, ThreadFunc<T> func) throws Error {
                base.try(name, func);
        }
}

I get the following error:

MThread.vala:3.3-3.18: error: chain up to `GLib.Thread' not supported
        base(name, func);
        ^^^^^^^^^^^^^^^^
MThread.vala:7.3-7.10: error: The name `try' does not exist in the
context of `GLib.Thread<T>'
        base.try(name, func);
        ^^^^^^^^
MThread.vala:6.2-6.19: error: unable to chain up to private base constructor
    public MThread.try(string? name, ThreadFunc<T> func) throws Error {
    ^^^^^^^^^^^^^^^^^^
Compilation failed: 3 error(s), 0 warning(s)

I found a similar issue in
https://mail.gnome.org/archives/vala-list/2009-October/msg00000.html but
it is not helping me very much. It just gives me
the idea, that my problem is something that is not as easily solved as
it sounds...

Thanks for any help in advance


Attachment: smime.p7s
Description: S/MIME Kryptografische Unterschrift



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