On Thu, Nov 18, 2010 at 11:02 PM, John Rose <[email protected]> wrote: > Suggestion: Make the "close" behavior optional, per wrapper. > Only set the "mustClose" bit on channels created via Ruby APIs.
Yes, unfortunately that seems to be the only option, since pretty much everybody believes we need to behave like C Ruby wrt finalization of IO objects (even while agreeing that leaving those IO streams to finalization is bad form). It also came to my attention that the core C Ruby folks had to address nearly the same issue with their IO.for_fd method that returns a new IO object wrapper around an arbitrary file descriptor. A user complained that the resulting IO object would always end up closing the fd, even if it was just "borrowing" it for a while, so the C Ruby answer was to introduce an "autoclose" flag on IO objects that disables the close-in-finalize behavior. Since we'll have to implement that anyway, and since people will expect autoclose = true to do something, the road may already be paved. - Charlie -- You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en.
