how to obtain pthread_suspend

Joël Krähemann weedlight@gmail.com
Sat Sep 14 18:51:00 GMT 2013


Am Samstag, den 14.09.2013, 13:53 -0400 schrieb Carlos O'Donell:
> On Sat, Sep 14, 2013 at 7:55 AM, Joël Krähemann <weedlight@gmail.com> wrote:
> > I'll do a work-around but as long I can't suspend/resume the GUI loop,
> > it will block AgsTaskThread. I think that async-signal operations need a
> > point where it is synced else it won't be safe or you are doing some
> > ugly mutices scattered all along the code.
> 
> If you have complete control, and you need to suspend and resume at
> specific points then you can use a condition variable.
> 
> Signals will work, but if, like you said, you have some
> uninterruptable sections, then you need to use something like a
> condition variable.
> 
> Cheers,
> Carlos

Yes there are condition variables because I need to sync the threads.
Syncing isn't the only goal to achieve the application needs realtime
capabilities. And AgsGuiThread does overtake gtk's main loop. And Gtk
iteration function is sometimes greedy that means it doesn't fit into
the time period which causes some real bad latency.
I'm expecting of pthread_suspend that it can reduce the latency.

regards
Joël




More information about the Libc-help mailing list