A change has been pushed to master to mark the executor and scheduler
threads as daemon.

http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/commit/?id=44a7d235161a9bd96185d67ca69165b392c47db2

Please give master a try.
(or wait 24 hours and try the nightly SNAPSHOT)


--
Joakim Erdfelt <[email protected]>
webtide.com <http://www.webtide.com/> - intalio.com/jetty
Expert advice, services and support from from the Jetty & CometD experts
eclipse.org/jetty - cometd.org


On Tue, Jan 7, 2014 at 9:00 AM, Kasper Nielsen <[email protected]> wrote:

> Right,
>
> My problem is that I'm developing a library for others to use.
> And System.exit() just doesn't belong in any piece of code that should be
> used by others.
> I've tried dealing with libraries that uses System.exit and it is just a
> royal pain.
>
> I just want something simple. All the threads I create myself are daemon
> threads.
> But Jetty creates a lot of non-daemon threads. And I do not really
> understand why they
> aren't daemons (at least when created via
> org.eclipse.jetty.websocket.jsr356.JettyClientContainerProvider)?
>
> - Kasper
>
>
> On Tue, Jan 7, 2014 at 4:53 PM, John English <[email protected]>wrote:
>
>> On 07/01/2014 11:17, Kasper Nielsen wrote:
>>
>>> I do have users that might not remember to close the library in a
>>> finally block.
>>> Which is needed, for example, if some exception is thrown.
>>>
>>
>> Maybe kick off another thread from the main thread that does a join on
>> the main thread followed by System.exit? Something like this:
>>
>>   class Terminator extends Thread {
>>     private Thread creator;
>>     public Terminator() {
>>       creator = Thread.currentThread();
>>     }
>>     public void run() {
>>       while (creator.isAlive()) {
>>         try {
>>           creator.join();
>>         }
>>         catch Exception e) { }
>>       }
>>       System.exit(0);
>>     }
>>   }
>>
>> --
>> John English
>>
>> _______________________________________________
>> jetty-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
>
>
> _______________________________________________
> jetty-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to