[concurrency-interest] ScheduledThreadPoolExecutor and shutdown permission check.

Gregg Wonderly gregg at cytetech.com
Wed Apr 30 09:12:29 EDT 2008


Ben Manes wrote:
> Yes, but my point was that there may not be a need for an explicit 
> shutdown and an implicit one when the applet was stopped would solve 
> most use-cases.

The STPE is used in a class which has hundreds of instances created and 
destroyed over the life of the applet.  If I use daemon threads won't they still 
be parked when idle?

Gregg Wonderly

> ----- Original Message ----
> From: Gregg Wonderly <gregg at cytetech.com>
> To: Ben Manes <ben_manes at yahoo.com>
> Cc: gregg.wonderly at pobox.com; concurrency-interest 
> <concurrency-interest at cs.oswego.edu>
> Sent: Tuesday, April 29, 2008 2:23:45 PM
> Subject: Re: [concurrency-interest] ScheduledThreadPoolExecutor and 
> shutdown permission check.
> 
> Ben Manes wrote:
>  > Have you tried using a daemon thread factory?  I haven't done much work
>  > with applets, but I'd venture that this would allow it to shutdown 
> cleanly.
> 
> The exception comes out of the STPE when I call shutdown or 
> shutdownNow.  It is
> performing an permission check that is creating the problem.  A 
> different thread
> type wouldn't help in this case.
> 
> Gregg Wonderly
> 
> 
>  > ----- Original Message ----
>  > From: Gregg Wonderly <gregg at cytetech.com <mailto:gregg at cytetech.com>>
>  > To: concurrency-interest <concurrency-interest at cs.oswego.edu 
> <mailto:concurrency-interest at cs.oswego.edu>>
>  > Sent: Tuesday, April 29, 2008 10:29:46 AM
>  > Subject: [concurrency-interest] ScheduledThreadPoolExecutor and shutdown
>  > permission check.
>  >
>  > I have a STPE that I use in an applet.  At applet shutdown, I'd like to
>  > shutdown
>  > the executor, but alas it requests a Permission check for a
>  > RuntimePermission
>  > that I don't have in an unsigned applet.  It seems kind of silly to
>  > demand this
>  > permission when no other thread management permission exist in the 
> JDK for
>  > applets.  Am I missing something in consideration of this issue?
>  >
>  > Gregg Wonderly
>  > _______________________________________________
>  > Concurrency-interest mailing list
>  > Concurrency-interest at altair.cs.oswego.edu 
> <mailto:Concurrency-interest at altair.cs.oswego.edu>
>  > <mailto:Concurrency-interest at altair.cs.oswego.edu 
> <mailto:Concurrency-interest at altair.cs.oswego.edu>>
>  > http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>  >
>  > ------------------------------------------------------------------------
>  > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
>  > it now.
>  > 
> <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
> 
>  >  >
> 
> 
> ------------------------------------------------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try 
> it now. 
> <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
>  >



More information about the Concurrency-interest mailing list