From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 F173B4765E0 for ; Fri, 25 Dec 2020 14:23:50 +0300 (MSK) References: <5912b7266d065501fe33500c640048ac26804f0f.1608816289.git.sergepetrenko@tarantool.org> <4fc3e2cc-07f2-32c0-5311-b2243227527e@tarantool.org> From: Aleksandr Lyapunov Message-ID: Date: Fri, 25 Dec 2020 14:23:49 +0300 MIME-Version: 1.0 In-Reply-To: <4fc3e2cc-07f2-32c0-5311-b2243227527e@tarantool.org> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-US Subject: Re: [Tarantool-patches] [PATCH 2/2] feedback_daemon: send feedback on tarantool exit List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Serge Petrenko , v.shpilevoy@tarantool.org, mons@tarantool.org Cc: tarantool-patches@dev.tarantool.org > I may be mistaken, but as far as I understand, channel:put calls > fiber_wakeup() > under the hood. And fiber_wakeup() puts the fiber to execution at the > end of this particular > event loop iteration. > > The next on_shutdown trigger breaks the event loop though. And I'm not > sure whether > it does it immediately or waits till the event loop iteration end. > > Here's what the libev doc says: > ` > ev_break (loop, how) > >    Can be used to make a call to|ev_run|return early (but only after it >    has processed all outstanding events). > > ` > Looks like we're safe. The loop won't break until it processes the > fiber_wakeup event. Looks like you are right. But I feel uncomfortable when I rely on feature that is not documented and/or not covered with tests.