From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp54.i.mail.ru (smtp54.i.mail.ru [217.69.128.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id BB801452566 for ; Fri, 15 Nov 2019 17:59:43 +0300 (MSK) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) From: Serge Petrenko In-Reply-To: Date: Fri, 15 Nov 2019 17:59:43 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <9481B2D9-F00A-40DB-90B0-C26FD741ED8B@tarantool.org> References: <649a8cbc-6861-1a9f-7463-457c043a6484@tarantool.org> <1573741315.750102299@f189.i.mail.ru> Subject: Re: [Tarantool-patches] [PATCH 2/2] app/fiber: wait till a full event loop iteration ends. List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org Hi! Thank you for you reply! > 15 =D0=BD=D0=BE=D1=8F=D0=B1. 2019 =D0=B3., =D0=B2 0:44, Vladislav = Shpilevoy =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0= =D0=BB(=D0=B0): >=20 > Hi! Thanks for the fixes! >=20 >>> But more important questions are: >>> - How can a number from top() have a not 'number' type?=20 >>=20 >> It can't. I just wanted to implement a caconical is_finite check. >> I can remove it, if you want me to. >>=20 >>>=20 >>> - How can top() contain a NaN, and an infinite value?=20 >>=20 >> 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. >=20 > 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