From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [tarantool-patches] Re: [PATCH v2] core: Non-blocking io.popen References: <20190529070809.18962-1-szudin@tarantool.org> <20190530183438.m7p4mj6zzekdmfr3@esperanza> <81776c14-b970-09b7-600a-0ef114876f12@tarantool.org> <20190603172525.cia2tkbjui56rbaj@tkn_work_nb> From: Stanislav Zudin Message-ID: Date: Tue, 4 Jun 2019 10:11:15 +0300 MIME-Version: 1.0 In-Reply-To: <20190603172525.cia2tkbjui56rbaj@tkn_work_nb> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit To: Alexander Turenko Cc: tarantool-patches@freelists.org, Vladimir Davydov , Georgy Kirichenko List-ID: On 03.06.2019 20:25, Alexander Turenko wrote: >>> Come to think of it, we might need an explicit knob to destroy an object >>> even before it's collected. May be, consider re-adding close() for this? >>> Please consult with Alexander and/or Georgy re this. >>> >> >> Sasha, George, what do you think? > > I'm a bit out of context. Why we need explicit close()? To control > reaching a file descriptor limit? It can be worked around with > `handle = nil collectgarbage()`, but an explicit close() looks better. > Maybe it worth to add. > For now there is wait() as a final method. It waits for process termination and releases resources. So the question was: should we add close() to release resources explicitly? Anyway there is a finalizer who performs a final cleanup for the case when user forgot to do it.