[tarantool-patches] Re: [PATCH v2] core: Non-blocking io.popen

Stanislav Zudin szudin at tarantool.org
Tue Jun 4 10:11:15 MSK 2019



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.



More information about the Tarantool-patches mailing list