926 |
|
protected abstract boolean exec(); |
927 |
|
|
928 |
|
/** |
929 |
< |
* Returns, but does not unschedule or execute, the task most |
930 |
< |
* recently forked by the current thread but not yet executed, if |
931 |
< |
* one is available. There is no guarantee that this task will |
932 |
< |
* actually be polled or executed next. |
933 |
< |
* This method is designed primarily to support extensions, |
934 |
< |
* and is unlikely to be useful otherwise. |
935 |
< |
* This method may be invoked only from within |
936 |
< |
* ForkJoinTask computations. Attempts to invoke in other contexts |
937 |
< |
* result in exceptions or errors possibly including ClassCastException. |
929 |
> |
* Returns, but does not unschedule or execute, the task queued by |
930 |
> |
* the current thread but not yet executed, if one is |
931 |
> |
* available. There is no guarantee that this task will actually |
932 |
> |
* be polled or executed next. This method is designed primarily |
933 |
> |
* to support extensions, and is unlikely to be useful otherwise. |
934 |
> |
* This method may be invoked only from within ForkJoinTask |
935 |
> |
* computations. Attempts to invoke in other contexts result in |
936 |
> |
* exceptions or errors possibly including ClassCastException. |
937 |
|
* |
938 |
|
* @return the next task, or null if none are available |
939 |
|
*/ |
942 |
|
} |
943 |
|
|
944 |
|
/** |
945 |
< |
* Unschedules and returns, without executing, the task most |
946 |
< |
* recently forked by the current thread but not yet executed. |
947 |
< |
* This method is designed primarily to support extensions, |
948 |
< |
* and is unlikely to be useful otherwise. |
949 |
< |
* This method may be invoked only from within |
950 |
< |
* ForkJoinTask computations. Attempts to invoke in other contexts |
951 |
< |
* result in exceptions or errors possibly including ClassCastException. |
945 |
> |
* Unschedules and returns, without executing, the next task |
946 |
> |
* queued by the current thread but not yet executed. This method |
947 |
> |
* is designed primarily to support extensions, and is unlikely to |
948 |
> |
* be useful otherwise. This method may be invoked only from |
949 |
> |
* within ForkJoinTask computations. Attempts to invoke in other |
950 |
> |
* contexts result in exceptions or errors possibly including |
951 |
> |
* ClassCastException. |
952 |
|
* |
953 |
|
* @return the next task, or null if none are available |
954 |
|
*/ |
955 |
|
protected static ForkJoinTask<?> pollNextLocalTask() { |
956 |
< |
return ((ForkJoinWorkerThread)(Thread.currentThread())).popTask(); |
956 |
> |
return ((ForkJoinWorkerThread)(Thread.currentThread())).pollLocalTask(); |
957 |
|
} |
958 |
< |
|
958 |
> |
|
959 |
|
/** |
960 |
< |
* Unschedules and returns, without executing, the task most |
961 |
< |
* recently forked by the current thread but not yet executed, if |
962 |
< |
* one is available, or if not available, a task that was forked |
963 |
< |
* by some other thread, if available. Availability may be |
964 |
< |
* transient, so a <code>null</code> result does not necessarily |
965 |
< |
* imply quiecence of the pool this task is operating in. |
966 |
< |
* This method is designed primarily to support extensions, |
967 |
< |
* and is unlikely to be useful otherwise. |
969 |
< |
* This method may be invoked only from within |
960 |
> |
* Unschedules and returns, without executing, the next task |
961 |
> |
* queued by the current thread but not yet executed, if one is |
962 |
> |
* available, or if not available, a task that was forked by some |
963 |
> |
* other thread, if available. Availability may be transient, so a |
964 |
> |
* <code>null</code> result does not necessarily imply quiecence |
965 |
> |
* of the pool this task is operating in. This method is designed |
966 |
> |
* primarily to support extensions, and is unlikely to be useful |
967 |
> |
* otherwise. This method may be invoked only from within |
968 |
|
* ForkJoinTask computations. Attempts to invoke in other contexts |
969 |
< |
* result in exceptions or errors possibly including ClassCastException. |
969 |
> |
* result in exceptions or errors possibly including |
970 |
> |
* ClassCastException. |
971 |
|
* |
972 |
|
* @return a task, or null if none are available |
973 |
|
*/ |