You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Janusz Dziemidowicz (JIRA)" <ji...@apache.org> on 2010/06/12 14:50:27 UTC
[jira] Created: (SHINDIG-1366) New ThreadFactory created for every
new daemon thread
New ThreadFactory created for every new daemon thread
-----------------------------------------------------
Key: SHINDIG-1366
URL: https://issues.apache.org/jira/browse/SHINDIG-1366
Project: Shindig
Issue Type: Bug
Components: Java
Affects Versions: 1.1-BETA5
Reporter: Janusz Dziemidowicz
Priority: Minor
In DefaultGuiceModule class there is a daemon thread factory created:
{code}
public static final ThreadFactory DAEMON_THREAD_FACTORY =
new ThreadFactory() {
public Thread newThread(Runnable r) {
Thread t = Executors.defaultThreadFactory().newThread(r);
t.setDaemon(true);
return t;
}
};
{code}
However, Executors.defaultThreadFactory() returns new thread factory on every call, so each thread will be created using new factory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SHINDIG-1366) New ThreadFactory created for every
new daemon thread
Posted by "Paul Lindner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Lindner resolved SHINDIG-1366.
-----------------------------------
Fix Version/s: 2.0.0-RC1
Resolution: Fixed
Thanks! Patch applied.
> New ThreadFactory created for every new daemon thread
> -----------------------------------------------------
>
> Key: SHINDIG-1366
> URL: https://issues.apache.org/jira/browse/SHINDIG-1366
> Project: Shindig
> Issue Type: Bug
> Components: Java
> Affects Versions: 1.1-BETA5
> Reporter: Janusz Dziemidowicz
> Priority: Minor
> Fix For: 2.0.0-RC1
>
> Attachments: thread_factory.diff
>
>
> In DefaultGuiceModule class there is a daemon thread factory created:
> {code}
> public static final ThreadFactory DAEMON_THREAD_FACTORY =
> new ThreadFactory() {
> public Thread newThread(Runnable r) {
> Thread t = Executors.defaultThreadFactory().newThread(r);
> t.setDaemon(true);
> return t;
> }
> };
> {code}
> However, Executors.defaultThreadFactory() returns new thread factory on every call, so each thread will be created using new factory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SHINDIG-1366) New ThreadFactory created for every
new daemon thread
Posted by "Janusz Dziemidowicz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Janusz Dziemidowicz updated SHINDIG-1366:
-----------------------------------------
Attachment: thread_factory.diff
Simple patch that fixes the problem.
> New ThreadFactory created for every new daemon thread
> -----------------------------------------------------
>
> Key: SHINDIG-1366
> URL: https://issues.apache.org/jira/browse/SHINDIG-1366
> Project: Shindig
> Issue Type: Bug
> Components: Java
> Affects Versions: 1.1-BETA5
> Reporter: Janusz Dziemidowicz
> Priority: Minor
> Attachments: thread_factory.diff
>
>
> In DefaultGuiceModule class there is a daemon thread factory created:
> {code}
> public static final ThreadFactory DAEMON_THREAD_FACTORY =
> new ThreadFactory() {
> public Thread newThread(Runnable r) {
> Thread t = Executors.defaultThreadFactory().newThread(r);
> t.setDaemon(true);
> return t;
> }
> };
> {code}
> However, Executors.defaultThreadFactory() returns new thread factory on every call, so each thread will be created using new factory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.