On 19 November 2010 04:04, Charles Oliver Nutter <[email protected]> wrote:
> we have introduced subtle bugs over the years, such as when a channel
> we don't own enters Ruby, we wrap it, and then our finalization closes
> it prematurely.

One solution you could use here is to use a weak reference on the
original channel object instead of a finalizer and have a background
thread (you're already running one for the JIT or something like that,
right?) polling a reference queue and closing channel objects there:
That way channels seen by ruby would be automatically closed, but not
until *any* code that might be using them was done with them, not just
the wrapping ruby code.

-- 
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.

Reply via email to