|
Re: Deamon thread Factory: msg#00042java.jsr.166-concurrency
Daemon threads should be used sparingly, for reasons given in Sec 7.4.2 of JCiP. Adding such a method to Executors would inevitably encourage people to use daemon threads even where inappropriate. Better to have the folks who really need a daemonThreadFactory() method roll their own. It's easy enough: 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; } }; } --tim On 10/20/06, Kasper Nielsen <kav@xxxxxx> wrote: Hi, _______________________________________________ Concurrency-interest mailing list Concurrency-interest@xxxxxxxxxxxxxxxxxxxx http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Unsafe publication of generic reflection information?, Ernst, Matthias |
|---|---|
| Next by Date: | Re: Deamon thread Factory, Moran Avigdor |
| Previous by Thread: | Deamon thread Factory, Kasper Nielsen |
| Next by Thread: | Re: Deamon thread Factory, Moran Avigdor |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |