[concurrency-interest] [Javamemorymodel-discussion] Fences.keepAlive
Gregg Wonderly
gregg at cytetech.com
Wed Jan 21 13:05:53 EST 2009
Doug Lea wrote:
> 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.
Maybe I'm still not getting what the underlying issue is. I thought we were
talking about the fact that because there were no other visible references that
the Compiler/GC might decide on actions that would cause the object to be made
eligible for GC. So, to me releaseHere(), or doneUsingReference() or
holdThisUntilHere() or some such is the control that we are trying to put in
place. Am I still missing something?
Gregg Wonderly
More information about the Concurrency-interest
mailing list