RE: JavaMemoryModel: Performing speculative writes ahead of loops that may not terminate

From: David Holmes (
Date: Sun May 30 2004 - 21:40:01 EDT

Eliot moss wrote:
> I would agree. The interesting case in this context is where the loop does
> only thread-private work, perhaps only on local variables all of
> which have
> been allocated to registers .... EM

Define thread-private work? The loop can be processing a buffer that is no
longer referenced from the master thread and hence is "thread-local" in some

The loop need not use the buffer at all - the worker could read data from
the buffer then enter a processing loop on the read data (say numeric
values) and the loop then becomes of the form:

  while (!converged) processData();
  workerFinished = true;

processData could be purely thread-local actions.

David Holmes

JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:08 EDT