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

Reply via email to