river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Firmstone <j...@zeus.net.au>
Subject Re: com.sun.jini.thread lock contention
Date Sat, 05 Jun 2010 00:07:09 GMT
Gregg Wonderly wrote:
> The TaskManager class has a subclass of Thread that it uses to run 
> tasks.  The problem with subclassing Thread, is that there is a lock 
> that is used in Thread to see if some methods are overridden so that 
> security can be maintained.  So, in an environment where Thread is 
> used with a SecurityManager, it is better to use a Runnable to 
> encapsulate the custom code, instead of a Thread.

Makes sense.

>
> The TaskThread class should be a Runnable instead of a Thread, and 
> then there are just 3 other places where it is referenced that need 
> some adjustment.  The thread that is running inside of the runnable 
> needs to be put into a per instance variable for one place where 
> interrupt processing is handled.
>
> Gregg Wonderly
>
Got a patch?

Cheers,

Peter.



Mime
View raw message