[Tarantool-patches] [PATCH 2/2] app/fiber: wait till a full event loop iteration ends.

Serge Petrenko sergepetrenko at tarantool.org
Fri Nov 15 17:59:43 MSK 2019


Hi! Thank you for you reply!

> 15 нояб. 2019 г., в 0:44, Vladislav Shpilevoy <v.shpilevoy at tarantool.org> написал(а):
> 
> Hi! Thanks for the fixes!
> 
>>> But more important questions are:
>>> - How can a number from top() have a not 'number' type? 
>> 
>> It can't. I just wanted to implement a caconical is_finite check.
>> I can remove it, if you want me to.
>> 
>>> 
>>> - How can top() contain a NaN, and an infinite value? 
>> 
>> NaN: you issue fiber.top() on the same iteration you called
>> fiber.top_enable(). cord()->clock_delta_last and fiber()->clock_delta_last
>> both are 0, because clock_delta_last contains data from a previous ev loop
>> iteration. Division gives you NaN.
> 
> Hm, so a user should be ready that top() can return invalid values?
> I think that it may be better to return 0, when cord()->clock_delta_last
> is 0.

Seems reasonable. I fixed it in the first patch, added some more cleanups
there and resent the whole series as v2.

--
Serge Petrenko
sergepetrenko at tarantool.org




More information about the Tarantool-patches mailing list