You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Paul Lindner (JIRA)" <ji...@apache.org> on 2009/09/03 00:48:32 UTC
[jira] Created: (SHINDIG-1164) Shindig default Executor can block
shutdown
Shindig default Executor can block shutdown
-------------------------------------------
Key: SHINDIG-1164
URL: https://issues.apache.org/jira/browse/SHINDIG-1164
Project: Shindig
Issue Type: Improvement
Components: Java
Affects Versions: 1.1-BETA2
Reporter: Paul Lindner
Assignee: Paul Lindner
Fix For: 1.1-BETA3
The default executor service used by shindig is created like this:
Executors.newCachedThreadPool()
This call uses a thread factory that uses non-daemon threads. Under certain circumstances the fetching code (and who knows what else) will have blocked threads that keep this pool from shutting down cleanly.
I'd like to use a Thread Factory that uses daemon threads to insure that this is not an issue.
Something like this:
public static ThreadFactory daemonThreadFactory() {
final ThreadFactory f = Executors.defaultThreadFactory();
return new ThreadFactory() {
public Thread newThread(Runnable r) {
Thread t = f.newThread(r);
t.setDaemon(true);
return t;
}
};
}
Does everyone think that this is the right solution?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SHINDIG-1164) Shindig default Executor can block
shutdown
Posted by "Paul Lindner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Lindner updated SHINDIG-1164:
----------------------------------
Attachment: tf.diff
patch
> Shindig default Executor can block shutdown
> -------------------------------------------
>
> Key: SHINDIG-1164
> URL: https://issues.apache.org/jira/browse/SHINDIG-1164
> Project: Shindig
> Issue Type: Improvement
> Components: Java
> Affects Versions: 1.1-BETA2
> Reporter: Paul Lindner
> Assignee: Paul Lindner
> Fix For: 1.1-BETA3
>
> Attachments: tf.diff
>
>
> The default executor service used by shindig is created like this:
> Executors.newCachedThreadPool()
> This call uses a thread factory that uses non-daemon threads. Under certain circumstances the fetching code (and who knows what else) will have blocked threads that keep this pool from shutting down cleanly.
> I'd like to use a Thread Factory that uses daemon threads to insure that this is not an issue.
> Something like this:
> public static ThreadFactory daemonThreadFactory() {
> final ThreadFactory f = Executors.defaultThreadFactory();
> return new ThreadFactory() {
> public Thread newThread(Runnable r) {
> Thread t = f.newThread(r);
> t.setDaemon(true);
> return t;
> }
> };
> }
> Does everyone think that this is the right solution?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SHINDIG-1164) Shindig default Executor can block
shutdown
Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750906#action_12750906 ]
Kevin Brown commented on SHINDIG-1164:
--------------------------------------
Why not just add a shut down hook that calls shutdownNow ?
> Shindig default Executor can block shutdown
> -------------------------------------------
>
> Key: SHINDIG-1164
> URL: https://issues.apache.org/jira/browse/SHINDIG-1164
> Project: Shindig
> Issue Type: Improvement
> Components: Java
> Affects Versions: 1.1-BETA2
> Reporter: Paul Lindner
> Assignee: Paul Lindner
> Fix For: 1.1-BETA3
>
> Attachments: tf.diff
>
>
> The default executor service used by shindig is created like this:
> Executors.newCachedThreadPool()
> This call uses a thread factory that uses non-daemon threads. Under certain circumstances the fetching code (and who knows what else) will have blocked threads that keep this pool from shutting down cleanly.
> I'd like to use a Thread Factory that uses daemon threads to insure that this is not an issue.
> Something like this:
> public static ThreadFactory daemonThreadFactory() {
> final ThreadFactory f = Executors.defaultThreadFactory();
> return new ThreadFactory() {
> public Thread newThread(Runnable r) {
> Thread t = f.newThread(r);
> t.setDaemon(true);
> return t;
> }
> };
> }
> Does everyone think that this is the right solution?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SHINDIG-1164) Shindig default Executor can block
shutdown
Posted by "Paul Lindner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Lindner resolved SHINDIG-1164.
-----------------------------------
Resolution: Fixed
applied.
> Shindig default Executor can block shutdown
> -------------------------------------------
>
> Key: SHINDIG-1164
> URL: https://issues.apache.org/jira/browse/SHINDIG-1164
> Project: Shindig
> Issue Type: Improvement
> Components: Java
> Affects Versions: 1.1-BETA2
> Reporter: Paul Lindner
> Assignee: Paul Lindner
> Fix For: 1.1-BETA3
>
> Attachments: tf.diff
>
>
> The default executor service used by shindig is created like this:
> Executors.newCachedThreadPool()
> This call uses a thread factory that uses non-daemon threads. Under certain circumstances the fetching code (and who knows what else) will have blocked threads that keep this pool from shutting down cleanly.
> I'd like to use a Thread Factory that uses daemon threads to insure that this is not an issue.
> Something like this:
> public static ThreadFactory daemonThreadFactory() {
> final ThreadFactory f = Executors.defaultThreadFactory();
> return new ThreadFactory() {
> public Thread newThread(Runnable r) {
> Thread t = f.newThread(r);
> t.setDaemon(true);
> return t;
> }
> };
> }
> Does everyone think that this is the right solution?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SHINDIG-1164) Shindig default Executor can block
shutdown
Posted by "Paul Lindner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12751094#action_12751094 ]
Paul Lindner commented on SHINDIG-1164:
---------------------------------------
Actually I think I'll add both...
> Shindig default Executor can block shutdown
> -------------------------------------------
>
> Key: SHINDIG-1164
> URL: https://issues.apache.org/jira/browse/SHINDIG-1164
> Project: Shindig
> Issue Type: Improvement
> Components: Java
> Affects Versions: 1.1-BETA2
> Reporter: Paul Lindner
> Assignee: Paul Lindner
> Fix For: 1.1-BETA3
>
> Attachments: tf.diff
>
>
> The default executor service used by shindig is created like this:
> Executors.newCachedThreadPool()
> This call uses a thread factory that uses non-daemon threads. Under certain circumstances the fetching code (and who knows what else) will have blocked threads that keep this pool from shutting down cleanly.
> I'd like to use a Thread Factory that uses daemon threads to insure that this is not an issue.
> Something like this:
> public static ThreadFactory daemonThreadFactory() {
> final ThreadFactory f = Executors.defaultThreadFactory();
> return new ThreadFactory() {
> public Thread newThread(Runnable r) {
> Thread t = f.newThread(r);
> t.setDaemon(true);
> return t;
> }
> };
> }
> Does everyone think that this is the right solution?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.