Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #29872

Re: refusal to quit

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Knute Johnson <eternal@knutejohnson.com>
Newsgroups comp.lang.java.programmer
Subject Re: refusal to quit
Date Fri, 29 Aug 2014 17:25:36 -0700
Organization A noiseless patient Spider
Lines 23
Message-ID <ltr5lu$iq0$1@dont-email.me> (permalink)
References <u1c10ap9r3l11teuhngbr5on958vu8h2vj@4ax.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Sat, 30 Aug 2014 00:25:34 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="aba33539224e5c782fe0c4053f7756fd"; logging-data="19264"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/50QsWVg5wxIOifYXaXkvP"
User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0
In-Reply-To <u1c10ap9r3l11teuhngbr5on958vu8h2vj@4ax.com>
Cancel-Lock sha1:o3akXxboZ5FI1Eu/mhHsvlDfYxk=
Xref csiph.com comp.lang.java.programmer:29872

Show key headers only | View raw


On 8/29/2014 09:56, Roedy Green wrote:
> Sometimes programs simply refuse to quit after main has terminated.
>
> Sometimes the app is single-thread so I am baffled what it is waiting
> for.
>
> Practically I can make things work by adding a System.exit(0)
> as the last thing in main.
>
> However, I would like to understand what is going on.  Is there a way
> to shed some light on why a program won't quit?
>

Timers, Threads (even daemon threads sometimes although they aren't 
supposed to stop shutdown), EDT held on undisposed JFrames or JDialogs. 
  Sometimes finding them all can be a pain.

I pretty much don't use System.exit anymore so that I'm forced to find 
all the running things and shut them off so the program will quit.

-- 

Knute Johnson

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

refusal to quit Roedy Green <see_website@mindprod.com.invalid> - 2014-08-29 09:56 -0700
  Re: refusal to quit Mike Amling <mamling@chaff.us> - 2014-08-29 12:50 -0500
    Re: refusal to quit Roedy Green <see_website@mindprod.com.invalid> - 2014-08-31 11:31 -0700
      Re: refusal to quit Josip Almasi <joe@vrspace.org> - 2014-09-01 17:14 +0200
        Re: refusal to quit Roedy Green <see_website@mindprod.com.invalid> - 2014-09-01 16:37 -0700
  Re: refusal to quit Josip Almasi <joe@vrspace.org> - 2014-08-29 22:16 +0200
    Re: refusal to quit Roedy Green <see_website@mindprod.com.invalid> - 2014-08-31 11:32 -0700
      Re: refusal to quit Josip Almasi <joe@vrspace.org> - 2014-09-01 17:20 +0200
  Re: refusal to quit Knute Johnson <eternal@knutejohnson.com> - 2014-08-29 17:25 -0700
  Re: refusal to quit Roedy Green <see_website@mindprod.com.invalid> - 2014-09-01 14:20 -0700
    Re: refusal to quit Roedy Green <see_website@mindprod.com.invalid> - 2014-09-01 14:34 -0700
    Re: refusal to quit Josip Almasi <joe@vrspace.org> - 2014-09-02 10:49 +0200
    Re: refusal to quit Arne Vajhøj <arne@vajhoej.dk> - 2014-09-07 22:04 -0400
  Re: refusal to quit Jan Burse <janburse@fastmail.fm> - 2014-09-02 12:17 +0200

csiph-web