Comment #32 on issue 288 by [email protected]: FinalizableReferenceQueue still leaks
http://code.google.com/p/google-guice/issues/detail?id=288

There are many benefits:

1) the container can decide not to accept the task, in which case the cleanup work is only done in the foreground

2) the container can run the task on a 'pure' thread with no references to the app - part of the problem at the moment is that Guice/Guava creates a child thread which can have internal references back to the parent thread (and from the to the app domain) that then lead to it not being GC'd properly - this should mean the thread will shutdown itself cleaning when the app is undeployed

3) the container can decide to attempt to stop the work by interrupting the runnable with an exception/error or if that fails by forcibly stopping the thread as a last resort

So while the Executor approach will let you forcibly shut down the thread, it should be seen as a last resort.

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" 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/google-guice-dev?hl=en.

Reply via email to