This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (scheme-window)


At 01:55 PM 4/17/2002 -0700, Per Bothner wrote:
>I've appended a suggested patch.  Does this work?

I think that should read:

>+  public static synchronized void exitIncrement()
>+  {
>+    exitCounter++;
>+  }
>+
>+  /** Work around an AWT bug, where AWT threads are non-daemon.
>+   * Thus if you start up AWT, the JVM will wait for the AWT to finish,
>+   * even if there are no other non-daemon threads.
>+   * So call exitIncrement() each time a Freme is created,
>+   * and call exitDecrement() a Frame is closed. */
>+  public static synchronized void exitDecrement()
>+  {
>+    if (exitCounter > 0)
>+      {
>+       exitCounter--;
>+       if (exitCounter == 0)
>+         {
>+           System.exit(0);
>+         }
>+  }

And so the workaround for Bruce's issue would be to call 
repl.exitIncrement() when starting up.

Or were you intending that user's who wanted to force System.exit following 
AWT initialization to call repl.exitDecrement?

Either way is not pretty and it is simply abominable that Sun ruined the 
daemon thread regime.

jim

----------------------------------------------------------------
James P. White     Pagesmiths' home is http://www.pagesmiths.com
Live free http://www.ushistory.org/franklin/quotable/quote04.htm
Try Kawa, the Java-based Scheme http://www.gnu.org/software/kawa


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]