Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d3bf00f
Reduce branchiness of Exchanger
DougLea May 26, 2025
336fb83
Merge branch 'openjdk:master' into JDK-8355026
DougLea May 27, 2025
954c5a1
Initial set of doc updates
DougLea Jun 18, 2025
02e1908
Merge remote-tracking branch 'refs/remotes/origin/master' into JDK-83…
DougLea Jun 18, 2025
519c981
Revert
DougLea Jun 18, 2025
cadb2c9
Address review comments
DougLea Jun 19, 2025
18ea3e7
Add JDK-8353155 doc improvement
DougLea Jun 19, 2025
bd543fc
Add JDK-8186959 docfix
DougLea Jun 19, 2025
4ef7649
Add JDK-8190889 docfix
DougLea Jun 19, 2025
b10114e
Add JDK-6317534 and JDK-6351533 doc improvements
DougLea Jun 19, 2025
c85698c
Add JDK-8195628 doc fix
DougLea Jun 19, 2025
93ece64
Adding JDK-8333172 to doc improvements
DougLea Jun 19, 2025
044d8dc
Address review comments; add JDK-6374942
DougLea Jun 20, 2025
26d96b8
Fix ARFU type; add JDK-7176957
DougLea Jun 20, 2025
4279a79
Address review comments; add JDK-8172177
DougLea Jun 21, 2025
0b511a6
Add JDK-6714849 doc update
DougLea Jun 21, 2025
6fb5c3d
Add JDK-6625724 as docfix
DougLea Jun 21, 2025
9d9239c
Add JDK-6526284 doc update
DougLea Jun 21, 2025
cd04e46
Add JDK-8137156
DougLea Jun 22, 2025
944ddab
Merge branch 'openjdk:master' into JDK-8359919
DougLea Jun 22, 2025
e9155cf
Reduce branchiness of Exchanger
DougLea May 26, 2025
b9fa262
Initial set of doc updates
DougLea Jun 18, 2025
896d13e
Revert
DougLea Jun 18, 2025
9bce5af
Address review comments
DougLea Jun 19, 2025
c08a46d
Add JDK-8353155 doc improvement
DougLea Jun 19, 2025
0780a51
Add JDK-8186959 docfix
DougLea Jun 19, 2025
8cf4508
Add JDK-8190889 docfix
DougLea Jun 19, 2025
baa2606
Add JDK-6317534 and JDK-6351533 doc improvements
DougLea Jun 19, 2025
a0f3852
Add JDK-8195628 doc fix
DougLea Jun 19, 2025
96fb8f9
Adding JDK-8333172 to doc improvements
DougLea Jun 19, 2025
19d1d81
Address review comments; add JDK-6374942
DougLea Jun 20, 2025
e4ef534
Fix ARFU type; add JDK-7176957
DougLea Jun 20, 2025
68f32e7
Address review comments; add JDK-8172177
DougLea Jun 21, 2025
918564b
Add JDK-6714849 doc update
DougLea Jun 21, 2025
d9ac182
Add JDK-6625724 as docfix
DougLea Jun 21, 2025
9bc4c0d
Add JDK-6526284 doc update
DougLea Jun 21, 2025
08e4644
Add JDK-8137156
DougLea Jun 22, 2025
4be095c
Add JDK-6663476
DougLea Jun 24, 2025
fbf9b64
Add JDK-6663476
DougLea Jun 24, 2025
153b2b7
Merge branch 'openjdk:master' into JDK-8359919
DougLea Jun 24, 2025
533304c
Merge remote-tracking branch 'refs/remotes/origin/JDK-8359919' into J…
DougLea Jun 24, 2025
2a62fc8
Add JDK-8311131
DougLea Jun 24, 2025
edaf312
Use javadoc internal linkages in CHM
DougLea Jun 26, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@
import java.util.Objects;

/**
* Provides default implementations of {@link ExecutorService}
* execution methods. This class implements the {@code submit},
* {@code invokeAny} and {@code invokeAll} methods using a
* {@link RunnableFuture} returned by {@code newTaskFor}, which defaults
* to the {@link FutureTask} class provided in this package. For example,
* the implementation of {@code submit(Runnable)} creates an
* associated {@code RunnableFuture} that is executed and
* returned. Subclasses may override the {@code newTaskFor} methods
* to return {@code RunnableFuture} implementations other than
* {@code FutureTask}.
* Provides default implementations of {@link ExecutorService} methods
* other than {@link Executor#execute}. This class implements the {@code
* submit}, {@code invokeAny} and {@code invokeAll} methods using a
* {@link RunnableFuture} returned by {@code newTaskFor}, which
* defaults to the {@link FutureTask} class provided in this package.
* For example, the implementation of {@code submit(Runnable)} creates
* an associated {@code RunnableFuture} that is executed and
* returned. Subclasses may override the {@code newTaskFor} methods to
* return {@code RunnableFuture} implementations other than {@code
* FutureTask}.
*
* <p><b>Extension example.</b> Here is a sketch of a class
* that customizes {@link ThreadPoolExecutor} to use
Expand Down
268 changes: 141 additions & 127 deletions src/java.base/share/classes/java/util/concurrent/CompletionStage.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
* <p>Like {@link Hashtable} but unlike {@link HashMap}, this class
* does <em>not</em> allow {@code null} to be used as a key or value.
*
* <p>ConcurrentHashMaps support a set of sequential and parallel bulk
* <p id="Bulk">ConcurrentHashMaps support a set of sequential and parallel bulk
* operations that, unlike most {@link Stream} methods, are designed
* to be safely, and often sensibly, applied even with maps that are
* being concurrently updated by other threads; for example, when
Expand Down Expand Up @@ -3704,7 +3704,7 @@ final int batchFor(long b) {
}

/**
* Performs the given action for each (key, value).
* Performs the given {@linkplain ##Bulk bulk} action for each (key, value).
*
* @param parallelismThreshold the (estimated) number of elements
* needed for this operation to be executed in parallel
Expand All @@ -3720,7 +3720,7 @@ public void forEach(long parallelismThreshold,
}

/**
* Performs the given action for each non-null transformation
* Performs the given {@linkplain ##Bulk bulk} action for each non-null transformation
* of each (key, value).
*
* @param parallelismThreshold the (estimated) number of elements
Expand All @@ -3743,7 +3743,7 @@ public <U> void forEach(long parallelismThreshold,
}

/**
* Returns a non-null result from applying the given search
* Returns a non-null result from applying the given {@linkplain ##Bulk bulk} search
* function on each (key, value), or null if none. Upon
* success, further element processing is suppressed and the
* results of any other parallel invocations of the search
Expand All @@ -3767,7 +3767,7 @@ public <U> U search(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of accumulating the given {@linkplain ##Bulk bulk} transformation
* of all (key, value) pairs using the given reducer to
* combine values, or null if none.
*
Expand All @@ -3793,7 +3793,7 @@ public <U> U reduce(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of accumulating the given {@linkplain ##Bulk bulk} transformation
* of all (key, value) pairs using the given reducer to
* combine values, and the given basis as an identity value.
*
Expand All @@ -3819,7 +3819,7 @@ public double reduceToDouble(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of accumulating the given {@linkplain ##Bulk bulk} transformation
* of all (key, value) pairs using the given reducer to
* combine values, and the given basis as an identity value.
*
Expand All @@ -3845,7 +3845,7 @@ public long reduceToLong(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of accumulating the given {@linkplain ##Bulk bulk} transformation
* of all (key, value) pairs using the given reducer to
* combine values, and the given basis as an identity value.
*
Expand All @@ -3871,7 +3871,7 @@ public int reduceToInt(long parallelismThreshold,
}

/**
* Performs the given action for each key.
* Performs the given {@linkplain ##Bulk bulk} action for each key.
*
* @param parallelismThreshold the (estimated) number of elements
* needed for this operation to be executed in parallel
Expand All @@ -3887,7 +3887,7 @@ public void forEachKey(long parallelismThreshold,
}

/**
* Performs the given action for each non-null transformation
* Performs the given {@linkplain ##Bulk bulk} action for each non-null transformation
* of each key.
*
* @param parallelismThreshold the (estimated) number of elements
Expand All @@ -3910,7 +3910,7 @@ public <U> void forEachKey(long parallelismThreshold,
}

/**
* Returns a non-null result from applying the given search
* Returns a non-null result from applying the given {@linkplain ##Bulk bulk} search
* function on each key, or null if none. Upon success,
* further element processing is suppressed and the results of
* any other parallel invocations of the search function are
Expand All @@ -3934,7 +3934,7 @@ public <U> U searchKeys(long parallelismThreshold,
}

/**
* Returns the result of accumulating all keys using the given
* Returns the result of {@linkplain ##Bulk bulk} accumulating all keys using the given
* reducer to combine values, or null if none.
*
* @param parallelismThreshold the (estimated) number of elements
Expand All @@ -3953,7 +3953,7 @@ public K reduceKeys(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of {@linkplain ##Bulk bulk} accumulating the given transformation
* of all keys using the given reducer to combine values, or
* null if none.
*
Expand All @@ -3979,7 +3979,7 @@ public <U> U reduceKeys(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of {@linkplain ##Bulk bulk} accumulating the given transformation
* of all keys using the given reducer to combine values, and
* the given basis as an identity value.
*
Expand All @@ -4005,7 +4005,7 @@ public double reduceKeysToDouble(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of {@linkplain ##Bulk bulk} accumulating the given transformation
* of all keys using the given reducer to combine values, and
* the given basis as an identity value.
*
Expand All @@ -4031,7 +4031,7 @@ public long reduceKeysToLong(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of {@linkplain ##Bulk bulk} accumulating the given transformation
* of all keys using the given reducer to combine values, and
* the given basis as an identity value.
*
Expand All @@ -4057,7 +4057,7 @@ public int reduceKeysToInt(long parallelismThreshold,
}

/**
* Performs the given action for each value.
* Performs the given {@linkplain ##Bulk bulk} action for each value.
*
* @param parallelismThreshold the (estimated) number of elements
* needed for this operation to be executed in parallel
Expand All @@ -4074,7 +4074,7 @@ public void forEachValue(long parallelismThreshold,
}

/**
* Performs the given action for each non-null transformation
* Performs the given {@linkplain ##Bulk bulk} action for each non-null transformation
* of each value.
*
* @param parallelismThreshold the (estimated) number of elements
Expand All @@ -4097,7 +4097,7 @@ public <U> void forEachValue(long parallelismThreshold,
}

/**
* Returns a non-null result from applying the given search
* Returns a non-null result from {@linkplain ##Bulk bulk} applying the given search
* function on each value, or null if none. Upon success,
* further element processing is suppressed and the results of
* any other parallel invocations of the search function are
Expand All @@ -4121,7 +4121,7 @@ public <U> U searchValues(long parallelismThreshold,
}

/**
* Returns the result of accumulating all values using the
* Returns the result of {@linkplain ##Bulk bulk} accumulating all values using the
* given reducer to combine values, or null if none.
*
* @param parallelismThreshold the (estimated) number of elements
Expand All @@ -4139,7 +4139,7 @@ public V reduceValues(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of {@linkplain ##Bulk bulk} accumulating the given transformation
* of all values using the given reducer to combine values, or
* null if none.
*
Expand All @@ -4165,7 +4165,7 @@ public <U> U reduceValues(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of {@linkplain ##Bulk bulk} accumulating the given transformation
* of all values using the given reducer to combine values,
* and the given basis as an identity value.
*
Expand All @@ -4191,7 +4191,7 @@ public double reduceValuesToDouble(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of {@linkplain ##Bulk bulk} accumulating the given transformation
* of all values using the given reducer to combine values,
* and the given basis as an identity value.
*
Expand All @@ -4217,7 +4217,7 @@ public long reduceValuesToLong(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of {@linkplain ##Bulk bulk} accumulating the given transformation
* of all values using the given reducer to combine values,
* and the given basis as an identity value.
*
Expand All @@ -4243,7 +4243,7 @@ public int reduceValuesToInt(long parallelismThreshold,
}

/**
* Performs the given action for each entry.
* Performs the given {@linkplain ##Bulk bulk} action for each entry.
*
* @param parallelismThreshold the (estimated) number of elements
* needed for this operation to be executed in parallel
Expand All @@ -4258,7 +4258,7 @@ public void forEachEntry(long parallelismThreshold,
}

/**
* Performs the given action for each non-null transformation
* Performs the given {@linkplain ##Bulk bulk} action for each non-null transformation
* of each entry.
*
* @param parallelismThreshold the (estimated) number of elements
Expand All @@ -4281,7 +4281,7 @@ public <U> void forEachEntry(long parallelismThreshold,
}

/**
* Returns a non-null result from applying the given search
* Returns a non-null result from {@linkplain ##Bulk bulk} applying the given search
* function on each entry, or null if none. Upon success,
* further element processing is suppressed and the results of
* any other parallel invocations of the search function are
Expand All @@ -4305,7 +4305,7 @@ public <U> U searchEntries(long parallelismThreshold,
}

/**
* Returns the result of accumulating all entries using the
* Returns the result of {@linkplain ##Bulk bulk} accumulating all entries using the
* given reducer to combine values, or null if none.
*
* @param parallelismThreshold the (estimated) number of elements
Expand All @@ -4323,7 +4323,7 @@ public Map.Entry<K,V> reduceEntries(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of {@linkplain ##Bulk bulk} accumulating the given transformation
* of all entries using the given reducer to combine values,
* or null if none.
*
Expand All @@ -4349,7 +4349,7 @@ public <U> U reduceEntries(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of {@linkplain ##Bulk bulk} accumulating the given transformation
* of all entries using the given reducer to combine values,
* and the given basis as an identity value.
*
Expand All @@ -4375,7 +4375,7 @@ public double reduceEntriesToDouble(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of {@linkplain ##Bulk bulk} accumulating the given transformation
* of all entries using the given reducer to combine values,
* and the given basis as an identity value.
*
Expand All @@ -4401,7 +4401,7 @@ public long reduceEntriesToLong(long parallelismThreshold,
}

/**
* Returns the result of accumulating the given transformation
* Returns the result of {@linkplain ##Bulk bulk} accumulating the given transformation
* of all entries using the given reducer to combine values,
* and the given basis as an identity value.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
* useful in programs involving a fixed sized party of threads that
* must occasionally wait for each other. The barrier is called
* <em>cyclic</em> because it can be re-used after the waiting threads
* are released.
* are released. If you need support for variable numbers of parties
* per cycle, alternate actions on exceptions, termination control,
* contention control, or status monitoring, use the more flexible
* {@link Phaser} class.
*
* <p>A {@code CyclicBarrier} supports an optional {@link Runnable} command
* that is run once per barrier point, after the last thread in the party
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
*
* <p>Method {@code submit} extends base method {@link
* Executor#execute(Runnable)} by creating and returning a {@link Future}
* that can be used to cancel execution and/or wait for completion.
* that can be used to cancel execution and/or wait for completion;
* also reporting exceptions that would otherwise be uncaught
* using method {@code execute}.
* Methods {@code invokeAny} and {@code invokeAll} perform the most
* commonly useful forms of bulk execution, executing a collection of
* tasks and then waiting for at least one, or all, to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public static ScheduledExecutorService newSingleThreadScheduledExecutor(ThreadFa
}

/**
* Creates a thread pool that can schedule commands to run after a
* Creates a fixed-size thread pool that can schedule commands to run after a
* given delay, or to execute periodically.
* @param corePoolSize the number of threads to keep in the pool,
* even if they are idle
Expand All @@ -318,7 +318,7 @@ public static ScheduledExecutorService newScheduledThreadPool(int corePoolSize)
}

/**
* Creates a thread pool that can schedule commands to run after a
* Creates a fixed-size thread pool that can schedule commands to run after a
* given delay, or to execute periodically.
* @param corePoolSize the number of threads to keep in the pool,
* even if they are idle
Expand Down
3 changes: 2 additions & 1 deletion src/java.base/share/classes/java/util/concurrent/Flow.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
* TRUE} item to a single subscriber. Because the subscriber receives
* only a single item, this class does not use buffering and ordering
* control required in most implementations (for example {@link
* SubmissionPublisher}).
* SubmissionPublisher}), and omits some error processing needed to
* fully conform to the Reactive Streams specification.
*
* <pre> {@code
* class OneShotPublisher implements Publisher<Boolean> {
Expand Down
Loading