Eric Johnson wrote:
Ortwin,

It is an odd problem. Not quite a dead-lock in the traditional sense. One thread is waiting on the other, and the other is waiting for the garbage collector. It just so happens that the garbage collector will never kick in, because the first thread happens to be the AWT Event thread, so the user cannot interact with the application any further, thus no objects get allocated, and there is no reason to garbage collect. To oversimplify, Thread A depends on Thread B depends on Thread C depends (indirectly) on Thread A.

Okay, I understand now. Ugly, ugly and a hard nut to crack, really.


The problem seems to be that we rely on the GC. I think this is extremely bad. Nobody should ever rely on the GC, because it can litteraly take ages until it runs, when you have huge amounts of memory. So our queue could get *really* large and filled with stale objects.
It would be nicer if we could ask the objects in the queue directly if they are still 'usable' or if they are 'done with' and should be removed (maybe that is impossible though). I mean this weak reference stuff looks nice and elegant but it's unfortunately not very good for the cruel real world...


Any chance that we can remove this dependancy on the GC?

Odi


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to