Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Blocker
-
Resolution: Unresolved
-
Affects Version/s: JRuby 1.4
-
Fix Version/s: JRuby 1.6.4
-
Component/s: Core Classes/Modules, Ruby 1.8.7, Ruby 1.9.2
-
Labels:None
Description
This bug is catching the remainder of the work from JRUBY-3964:
- When Enumerator thread creation gets ahead of GC for dead enumerators+threads, we must have a mechanism for choking the rate of creation of new enumerator threads. My proposed way would be to use a weak reference queue to actively tidy up old enumerators+threads in the logic to create a new one; this will slow down creation to the speed at which GCable threads can be cleaned up.
- When we reach a thread limit, we need to raise a nicer error. Right now the Java OOM error percolates out, killing the thread calling #next
- 1.9's threaded Fibers need to be made GCable like 1.8.7's threaded Generators are now (due to fixes made for 1.4).
This is a clone of the previous bug (
JRUBY-3964) to address a few additional points that were not critical enough for 1.4:JRUBY-3964) to address a few additional points that were not critical enough for 1.4: