From: Serge Petrenko <sergepetrenko@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 2/2] app/fiber: wait till a full event loop iteration ends.
Date: Fri, 15 Nov 2019 17:59:43 +0300 [thread overview]
Message-ID: <9481B2D9-F00A-40DB-90B0-C26FD741ED8B@tarantool.org> (raw)
In-Reply-To: <d5e530bc-b0d3-de29-acda-f0303b7ae559@tarantool.org>
Hi! Thank you for you reply!
> 15 нояб. 2019 г., в 0:44, Vladislav Shpilevoy <v.shpilevoy@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@tarantool.org
prev parent reply other threads:[~2019-11-15 14:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-13 18:03 [Tarantool-patches] [PATCH 0/2] fiber.top(): minor fixup Serge Petrenko
2019-11-13 18:04 ` [Tarantool-patches] [PATCH 1/2] fiber: reset clock stats on fiber.top_enable() Serge Petrenko
2019-11-13 18:04 ` [Tarantool-patches] [PATCH 2/2] app/fiber: wait till a full event loop iteration ends Serge Petrenko
2019-11-13 22:52 ` Vladislav Shpilevoy
2019-11-14 14:21 ` Sergey Petrenko
2019-11-14 21:44 ` Vladislav Shpilevoy
2019-11-15 14:59 ` Serge Petrenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9481B2D9-F00A-40DB-90B0-C26FD741ED8B@tarantool.org \
--to=sergepetrenko@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 2/2] app/fiber: wait till a full event loop iteration ends.' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox