Re: Recalculation of timeouts with g_timeout_add



On Fri, 16 May 2008 09:54:22 +0200
G Hasse <gorhas raditex se> wrote:

Let your callback return FALSE and reregister before the return

Hi, I thought of that but I was sure that there is a better way to do
this without playing games with unregistering and re-registering the
timeout.

I am not sure why the GTK devs decided that re-calculating the timeout
based on the time right after the timeout thread is started is the
right thing to do but it seems very wrong to me. 

What if the timeout function takes longer then the timeout itself? You
end up with multiple threads running the timeout function at the same
time.

-- 
Mitko Haralanov
==========================================
System going down at 1:45 this afternoon for disk crashing.



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