Skip to content

Commit

Permalink
remove old mentions of synchronization that no longer apply (#1253)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Mar 27, 2024
1 parent b8a132e commit bf6d3a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,9 @@ public static CharsToNameCanonicalizer createRoot(TokenStreamFactory owner, int
* read-only copy of parent's data, but when changes are needed, a
* copy will be created.
*<p>
* Note: while this method is synchronized, it is generally not
* safe to both use makeChild/mergeChild, AND to use instance
* actively. Instead, a separate 'root' instance should be used
* on which only makeChild/mergeChild are called, but instance itself
* Note: It is generally not safe to both use makeChild/mergeChild, AND to
* use instance actively. Instead, a separate 'root' instance should be
* used on which only makeChild/mergeChild are called, but instance itself
* is not used as a symbol table.
*
* @return Actual canonicalizer instance that can be used by a parser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ public SoftReference<BufferRecycler> wrapAndTrack(BufferRecycler br) {

/**
* Remove cleared (inactive) SoftRefs from our set. Gc may have cleared one or more,
* and made them inactive. We minimize contention by keeping synchronized sections short:
* the poll/remove methods
* and made them inactive.
*/
private void removeSoftRefsClearedByGc() {
SoftReference<?> clearedSoftRef;
Expand Down

0 comments on commit bf6d3a0

Please sign in to comment.