From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (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 5E98B452566 for ; Fri, 15 Nov 2019 00:38:39 +0300 (MSK) References: <649a8cbc-6861-1a9f-7463-457c043a6484@tarantool.org> <1573741315.750102299@f189.i.mail.ru> From: Vladislav Shpilevoy Message-ID: Date: Thu, 14 Nov 2019 22:44:53 +0100 MIME-Version: 1.0 In-Reply-To: <1573741315.750102299@f189.i.mail.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Sergey Petrenko Cc: tarantool-patches@dev.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.