On Sat, 2006-07-01 at 16:27 +0200, Jeroen Frijters wrote:
> Andrew John Hughes wrote:
> > No problem; the new name makes things a bit clearer too.  Really,
> > though, according to the specification, the ids should be reused after
> > the thread terminates (which both Tom's original solution and 
> > this patch don't handle).  I don't know how necessary this is though,
> > given that you'd have to have 2^63 - 1 threads to outrun available
> ids.
> 
> The spec allows the ids to be reused, but it does not require it. We
> could add code to handle overflow, but it doesn't seem likely that any
> real application will ever create more than 2^63 - 1 threads. On my
> current system it would take about half a million years to instantiate
> that many thread objects ;-)
> 
> Regards,
> Jeroen
> 

Exactly; it's pretty redundant, and maintaining the current easier
system of a rolling total count means you also have the total number of
threads started required for the bean.

Cheers,
-- 
Andrew :-)

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to