< prev index next >
src/java.base/share/classes/java/util/concurrent/CyclicBarrier.java
Print this page
8234131: Miscellaneous changes imported from jsr166 CVS 2021-01
Reviewed-by: martin
@@ -92,11 +92,13 @@
* thread.start();
* }
*
* // wait until done
* for (Thread thread : threads)
+ * try {
* thread.join();
+ * } catch (InterruptedException ex) { }
* }
* }}</pre>
*
* Here, each worker thread processes a row of the matrix, then waits at the
* barrier until all rows have been processed. When all rows are processed the
< prev index next >