ceylon-ide-eclipse
ceylon-ide-eclipse copied to clipboard
Use only one cleanup thread
We should be able to use only a single one of these:
"Thread-22197" daemon prio=10 tid=0x00007f0de01e3800 nid=0x36fe in Object.wait() [0x00007f0e0ac7a000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007af622040> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
- locked <0x00000007af622040> (a java.lang.ref.ReferenceQueue$Lock)
at com.redhat.ceylon.ide.common.model.ModuleDependencies$CleaningRunnable.run(ModuleDependencies.java:46)
at java.lang.Thread.run(Thread.java:745)
Locked ownable synchronizers:
- None
Rather than the ten I have on my IDE.
We don't start our own threads.
@gavinking : we do here, but in a very controlled way and for a very specific and internal purpose. Note that :
- these are deamon threads
- these threads will stop as soon as the related
ModuleDependencies
object is garbage collected, so will be in turn eligible to garbage collection.
Afaik these threads get correctly cleaned (ie don't constantly increase, clean build after clean build).
Of course if anyone can prove me the contrary, I'll assign the 1.2 milestone and make this issue a high-priority one.
Oh, ok.