Hi Marc, thanks for your answers, please find my comments in line

On 13 June 2011 03:54, Marc Lehmann <[email protected]> wrote:
> On Sat, Jun 11, 2011 at 10:58:32PM -0600, Juan Pablo L 
> <[email protected]> wrote:
>> but i m setting the repeat value to 60s and calling ev_timer_again,
>> before the time out happens i change the repeat value to, for example,
>> 5 segs and call ev_timer_again,
>> so i would expect the timer to time out 5 segs after i called
>> ev_timer_again for the second time but this is not happening, what i see is 
>> that
>> the timer first expires after the initial 60s and then expires again
>> 5s later. is this how it is
>> supposed to behave ?
>
> I am pretty sure you don't actually call ev_timer_again on that timer. Do
> you have a small test program that shows this? Are you you using threads?
>

yes i m calling ev_timer_again but i m calling from outside the loop
(not from any callback), i m calling from another thread.
yes i m using threads.

>> 2. when i want  to terminate the loop, at program exit, and the timers
>> have not expired the program hangs there
>> until, i guess the timers expire, i have tried calling ev_break but it
>> does not make any difference,
>
> ev_break will break out of the currently running loop. Are you sure you
> are calling it on the loop? Do you have a s,all test case that shows this
> behaviour? Are you using threads?
>

yes i m calling ev_break on this loop, what i know it works because i
m using it is if i call the ev_break from the loop callback, that
works, in this case
i m calling ev_break from another thread.
yes, i m using threads.

>> what i m doing is ev_time_stop on all timers when i m asked to exit
>> is this also supposed to behave like that ?
>
> Waiting (not hanging) until all watchers are stopped is normal and
> expected behaviour, yes. ev_break breaking out of the current loop is also
> expected.
>

yes i guess this happening because of the ev_break above.


let me try to put together a test program, i was trying to do that but
not much time.

regards!


> --
>                The choice of a       Deliantra, the free code+content MORPG
>      -----==-     _GNU_              http://www.deliantra.net
>      ----==-- _       generation
>      ---==---(_)__  __ ____  __      Marc Lehmann
>      --==---/ / _ \/ // /\ \/ /      [email protected]
>      -=====/_/_//_/\_,_/ /_/\_\
>
> _______________________________________________
> libev mailing list
> [email protected]
> http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
>

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to