[concurrency-interest] Ensure Callable.call is invoked fromconstructing thread?

Dhanji R. Prasanna dhanji at gmail.com
Fri Jun 9 22:36:58 EDT 2006

On 6/10/06, Thomas Hawtin <tackline at tackline.plus.com> wrote:
> System.identityHashCode does not produce unique values. A very common
> mistake - the documentation is a bit poor.
This is very interesting, identifying transient instances uniquely is
quite a common design problem for me. One good solution I find is
using IoC to instantiate/register your objects and store a unique id
for each, then query the container for the id. I'd venture that using
a thread pool similarly (with a unique checkout id) would be a good
solution if your architecture allows for it. just a thought.

> I guess Thread.currentThread().getId() should work (since 1.5), as
> should new WeakReference<Thread>(Thread.currentThread()).
> Tom Hawtin
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest

More information about the Concurrency-interest mailing list