[concurrency-interest] [Javamemorymodel-discussion] Fences.keepAlive

Doug Lea dl at cs.oswego.edu
Wed Jan 21 10:33:48 EST 2009


Gregg Wonderly wrote:
> To 
> me, keepAlive means starting at this point, until I tell you otherwise.  
> Something like releaseHere(), or something similar would make more sense.
> 

That's the main usability bug with any kind of fence method.
Fences separate other accesses, which is especially non-intuitive
in the common case that you cannot see those accesses locally in
program source. And worse here in that the accesses in question
surround reachability analysis by GC. And I can't think of
naming conventions like the pre/post scheme used with other fence
methods that make sense here. But further suggestions are still welcome.

"releaseHere" seems out because it mis-implies a directive to
gc/finalize.

-Doug



More information about the Concurrency-interest mailing list