Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8314480: Memory ordering spec updates in java.lang.ref #16644

Closed
wants to merge 72 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
19cbd29
spec update ideas around reachabilityFence
bchristi-git Aug 16, 2022
af9c828
more spec updates
bchristi-git Dec 9, 2022
d7829b0
tweak to mention Cleaner's thread
bchristi-git Jan 10, 2023
e1e3ad5
update memViz for Ref and RefQ
bchristi-git Apr 14, 2023
c7cde96
close paren
bchristi-git Apr 14, 2023
8c10b34
spec update ideas around reachabilityFence
bchristi-git Aug 16, 2022
d320d4e
more spec updates
bchristi-git Dec 9, 2022
bbf6473
tweak to mention Cleaner's thread
bchristi-git Jan 10, 2023
3262f0f
update memViz for Ref and RefQ
bchristi-git Apr 14, 2023
e2259af
close paren
bchristi-git Apr 14, 2023
4f0fb3e
Update java.lang.ref package doc
bchristi-git Apr 21, 2023
c991959
Merge branch 'refDocs2' of github.com:bchristi-git/jdk into refDocs2
bchristi-git Apr 21, 2023
c40bf65
some tweaks
bchristi-git Apr 21, 2023
516402e
@code
bchristi-git Apr 21, 2023
5f456db
consistency tweaks
bchristi-git Apr 21, 2023
64de072
tweak
bchristi-git Apr 21, 2023
2459aef
tweak again
bchristi-git Apr 21, 2023
53fcf0c
Update 'remains reachable', per Slack
bchristi-git Apr 26, 2023
301e640
Per slack, 'on a queue' is inconsistent with existing wording - reworked
bchristi-git Apr 26, 2023
5a9c24a
updates re: reference clearing
bchristi-git Apr 29, 2023
945747c
Updates to clear() and enqueue()
bchristi-git Aug 28, 2023
523c2bb
small tweak to enqueue()
bchristi-git Sep 14, 2023
fbc8fc3
Update enqueue() docs, add warnings about still-reachable referent
bchristi-git Sep 26, 2023
0048a72
spec update ideas around reachabilityFence
bchristi-git Aug 16, 2022
c5ab400
more spec updates
bchristi-git Dec 9, 2022
0659e37
tweak to mention Cleaner's thread
bchristi-git Jan 10, 2023
d48ee00
update memViz for Ref and RefQ
bchristi-git Apr 14, 2023
02b4720
close paren
bchristi-git Apr 14, 2023
effac92
Update java.lang.ref package doc
bchristi-git Apr 21, 2023
d785f99
Resolve merge conflict with master by hand
bchristi-git Nov 8, 2023
3ffd909
update memViz for Ref and RefQ
bchristi-git Apr 14, 2023
03d7081
some tweaks
bchristi-git Apr 21, 2023
069d105
consistency tweaks
bchristi-git Apr 21, 2023
72cbe86
Per slack, 'on a queue' is inconsistent with existing wording - reworked
bchristi-git Apr 26, 2023
2738200
updates re: reference clearing
bchristi-git Apr 29, 2023
1cfd75e
Updates to clear() and enqueue()
bchristi-git Aug 28, 2023
b4f5b90
Update enqueue() docs, add warnings about still-reachable referent
bchristi-git Sep 26, 2023
dfce0dd
Merge
bchristi-git Nov 9, 2023
84d8b61
Address a number of PR comments
bchristi-git Dec 5, 2023
0547752
Describe whole chain of hb relationships
bchristi-git Dec 12, 2023
c09db36
Add links to new Memory Consistency section in package doc
bchristi-git Dec 12, 2023
9b4b115
Remove hyphen in 'strongly reachable' in Cleaner
bchristi-git Jan 10, 2024
3647f64
Tweak Reference.enqueue memory consistency effects wording
bchristi-git Jan 10, 2024
7eb3397
Updates to clear() and enqueue()
bchristi-git Jan 25, 2024
1ca169e
Updates to reachabilityFence()
bchristi-git Feb 21, 2024
0f949d3
Cleaner thread dequeue happens-before running cleaning action
bchristi-git Feb 22, 2024
adb1fbe
VM -> virtual machine; also fix misspelling
bchristi-git Feb 23, 2024
855b13a
Tiny clarification to 'strongly reachable' definition; add link to Re…
bchristi-git Mar 1, 2024
603ff4d
update definition of strongly reachable
bchristi-git Mar 12, 2024
4d6f1dc
further tweaks to reachability
bchristi-git Mar 14, 2024
80a3973
Updates per review comments
bchristi-git Mar 18, 2024
3df288a
Elaborate on 'surprising and undesirable effects' in reachabilityFence()
bchristi-git Mar 21, 2024
15ae0f2
Small updates to reachabilityFence, per review
bchristi-git Mar 25, 2024
54a4441
Remove section about 'encapsulating' reachabilityFence()
bchristi-git Mar 26, 2024
0748ed0
elaborate on VM optimizations, field values outliving their object, etc
bchristi-git Mar 28, 2024
4648d06
Re-remove paragraph break
bchristi-git Mar 29, 2024
170c981
Stray blank line
bchristi-git Mar 29, 2024
bdac5cc
small reformat
bchristi-git Apr 4, 2024
91d4db4
Another update to reachabilityFence() @apiNote
bchristi-git Apr 5, 2024
27d0c24
add details on use of reference queues; swap reachability/memviz sect…
bchristi-git Apr 22, 2024
cc21d29
move reachability section before notification; update section header
bchristi-git Apr 23, 2024
16fcc76
package spec updates, mostly about reference queues and dequeueing
bchristi-git Apr 24, 2024
0b9d3ef
remove quotes from dequeue
bchristi-git Apr 25, 2024
77d5381
add memviz bullet for finalization
bchristi-git Apr 26, 2024
5f90b5d
new section for finalizer memviz
bchristi-git Apr 26, 2024
a41e6fc
small grammar fixes
bchristi-git Apr 29, 2024
5db4788
small review tweaks; shorten MemoryConsistency links
bchristi-git May 9, 2024
4efa5d1
add link to Thread.isAlive()
bchristi-git May 9, 2024
d7cbf0d
Merge branch 'master' into refDocs2
bchristi-git May 24, 2024
33334d0
convert sample to snippet; add 'JLS' label to jls links
bchristi-git May 30, 2024
e02bf98
simplify some java.lang.ref package doc links
bchristi-git May 31, 2024
cf0dc3b
another package doc link
bchristi-git May 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/java.base/share/classes/java/lang/ref/Reference.java
Original file line number Diff line number Diff line change
@@ -488,7 +488,7 @@ public boolean isEnqueued() {
* <b><i>successful</i></b> and returns true.
* If this reference is not registered with a queue, or was already enqueued
* (by the garbage collector, or a previous call to {@code enqueue}), this
* method is <b><i>unnsuccessful</i></b> and returns false.
* method is <b><i>unsuccessful</i></b> and returns false.
*
* <p><a href="{@docRoot}/java.base/java/lang/ref/package-summary.html#MemoryConsistency">Memory consistency effects</a>:
* Actions in a thread prior to calling
@@ -547,8 +547,8 @@ protected Object clone() throws CloneNotSupportedException {
* Ensures that the given object remains
* <a href="package-summary.html#reachability"><em>strongly reachable</em></a>.
* This reachability is assured regardless of any optimizing transformations
* the VM may perform that might otherwise allow the object to become
* unreachable (see {@jls 12.6.1}). Thus, the given object is not
* the virtual machine may perform that might otherwise allow the object to
* become unreachable (see {@jls 12.6.1}). Thus, the given object is not
* reclaimable by garbage collection at least until after the invocation of
* this method. References to the given object will not be cleared (or
* enqueued, if applicable) by the garbage collector until after invocation