[concurrency-interest] Fence API

Peter Jones peter.jones at sun.com
Tue Jan 27 15:01:41 EST 2009


On Tue, Jan 27, 2009 at 07:23:51AM -0500, Doug Lea wrote:
> Walking through discussions of the name for the method initially
> listed as "keepAlive", I'm giving one more shot to a concrete
> proposal before resorting to a poll/vote.
>
> The name "reachabilityFence" has a few virtues:
>   * mentions reachability vs aliveness
>   * "fence" implies the "here"-ness that was missing in other names
>   * is of a similar form as other fences, so the spec can phrased
>     in a similar way.
> Probably the main disadvantage is that it is more awkward-sounding
> that some other suggestions.
>
> An updated draft with this wording is at
> http://gee.cs.oswego.edu/dl/jsr166/dist/docs/java/util/concurrent/atomic/Fences.html
>
> Please take a look.

I like that name.  A nitpick perhaps, but this wording:

    this method is applicable only when reclamation may have visible
    effects, which is possible only for objects with finalizers

seems a bit narrow to me-- it can also apply when an entity external
to an object is tracking its reachability with reference objects (like
with the previously-mentioned RMI DGC use case, bug 6181943).  Rather
than expand further here, removing the second "only" seems OK to me.

-- Peter


More information about the Concurrency-interest mailing list