On 11/11/2010 20:13, Frank Eory wrote:
 saw in some places in the forum, I saw a recommendation to do lock() awake() 
unlock(). I have it in my big program in the lock() unlock() awake() order and 
if
I change it to the recommended way, my program freezes.
> 
> The add_timeout works on whole seconds. I am going to revisit the concept and 
> see if I can modify the algorithm to do the delay in a chunk of one second, 
> instead of looping multiple times and asking less than one second.

No, add_timeout() and repeat_timeout() accept double as argument and looping 
every eg. 0.1 s is pretty cheap: you can for instance examine a thread-shared
variable with a mutex. I used this approach instead of awake() - which was for 
me unreliable a few years ago, but things might changed in the mean time.

R.

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to