[concurrency-interest] Re: Thread.getId()

matthias.ernst@coremedia.com matthias.ernst@coremedia.com
Tue, 27 Jan 2004 20:27:55 +0100 (CET)


On 27 Jan 2004, Larry Riedel wrote:

> For me to be able to trivially and almost instantaneously
> determine whether or not the thread executing my code already
> executed the same (and/or some other) code before seems like a
> capability which could be pretty valuable to me.

How about a thread local set of 'code that this thread already executed' ?

Instead of Thread.currentThread() == threadWhoExecuted(code) it would be
tlExecutedCode.get().contains(code).

Or did I get the question wrong ?

Matthias
-- 
Matthias Ernst
CoreMedia - Smart Content Technology

"Toll takes its time."