[Vala] signal handling in gui thread

Jörn suggested:
  "... you can write such a class for vala ;)"

I had a look at gtkmm's implementation of Dispatcher.
Uggghhh. A lot of ifdefs to handle mswindows specifics.
And even if I can implement that class, its usage
wouldn't be as neat as vala's signal.

So, I emulate gtkmm's Dispatcher by replacing this:

  a_signal.connect ((arg) => { things_to_do (); });


  a_signal.connect ((arg) => { 
     Idle.add_full (Priority.HIGH, () => things_to_do (); });

Seems to work fine. I began to wonder why the gtkmm's
Dispatcher makes contorted use of pipes.

Nor Jaidi Tuah

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