kou commented on issue #40518: URL: https://github.com/apache/arrow/issues/40518#issuecomment-1997019743
I thought that it's a library bug but we can't care about this case in library. This is happen in GC. We can't allocate any Ruby related memory in GC. This is happen because a `Gio::RubyInputStream` object created by `Gio::RubyInputStream.open(chunk)` is GC-ed. The object calls `close` method when it's GC-ed. We need to allocate Ruby related memory to call `close` method. We can't avoid calling `close` because we can't determine whether we can avoid `close` call safely or not. It depends on how to implement IO-like object that is passed to `Gio::RubyInputStream.new`. Users can avoid this by calling `close` explicitly. For example, users can use block: ``` Gio::RubyInputStream.open(chunk) do end ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
