mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-02 14:38:28 +00:00
8187775: AtomicReferenceFieldUpdater does not support static fields 8254060: SubmissionPublisher close hangs if a publication is pending 8210149: Example in JavaDoc for java.util.concurrent.Flow violates Reactive Streams spec 8199501: Improve documentation of CompletableFuture, CompletionStage 8233050: CompletableFuture `whenComplete` and `thenApply` change exceptional result 8210312: JavaDoc example in SubmissionPublisher will potentially crash 8292365: CompletableFuture and CompletionStage should document Memory Model guarantees 8356304: Define "enabled" in ScheduledExecutorService 8353155: FutureTask#run(): doc implies synchronous, implementation is async 8186959: Clarify that Executors.newScheduledThreadPool() is fixed-size 8190889: TimeUnit.wait should document IllegalMonitorStateException 6351533: CyclicBarrier reset() should return the number of awaiters 6317534: CyclicBarrier should have a cancel() method 8195628: Documentation for lock(), trylock(), lockInterruptibly() of ReentrantReadWriteLock.WriteLock needs to be corrected 8333172: Document a recommendation to use VarHandles instead of java.util.concurrent.atomic.*FieldUpdater 6374942: Improve thread safety of collection .equals() methods 7176957: ExecutorService submit method javaDoc enhancement 8172177: Improve documentation for CompletionException handling 6714849: ReentrantReadWriteLock: Abnormal behavior in non-fair mode 6625724: Allow ReentrantReadWriteLock to not track per-thread read holds 6526284: Improve AbstractExecutorService javadoc 8137156: Javadoc for Future is misleading with respect to cancellation 6663476: FutureTask.get() may return null if set() is not called from run() 8311131: ConcurrentHashMap.forEachKey parallelismThreshold description could be clearer Reviewed-by: alanb
56 lines
2.1 KiB
Java
56 lines
2.1 KiB
Java
/*
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
*
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License version 2 only, as
|
|
* published by the Free Software Foundation. Oracle designates this
|
|
* particular file as subject to the "Classpath" exception as provided
|
|
* by Oracle in the LICENSE file that accompanied this code.
|
|
*
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
* accompanied this code).
|
|
*
|
|
* You should have received a copy of the GNU General Public License version
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
* questions.
|
|
*/
|
|
|
|
/*
|
|
* This file is available under and governed by the GNU General Public
|
|
* License version 2 only, as published by the Free Software Foundation.
|
|
* However, the following notice accompanied the original version of this
|
|
* file:
|
|
*
|
|
* Written by Doug Lea with assistance from members of JCP JSR-166
|
|
* Expert Group and released to the public domain, as explained at
|
|
* http://creativecommons.org/publicdomain/zero/1.0/
|
|
*/
|
|
|
|
package java.util.concurrent;
|
|
|
|
/**
|
|
* A {@link Future} that is {@link Runnable}. Successful execution of
|
|
* the {@code run} method causes completion of the {@code Future}
|
|
* and allows access to its results.
|
|
* @see FutureTask
|
|
* @see Executor
|
|
* @since 1.6
|
|
* @author Doug Lea
|
|
* @param <V> The result type returned by this Future's {@code get} method
|
|
*/
|
|
public interface RunnableFuture<V> extends Runnable, Future<V> {
|
|
/**
|
|
* Sets this Future to the result of its computation unless it has
|
|
* been cancelled (or has already been invoked, in which case
|
|
* effects are undefined).
|
|
*/
|
|
void run();
|
|
}
|