java - Abort a RecursiveTask with a given result? -
i'm facing following problem:
i interate on concurrenthashmap of recursiveaction dividing , conquering map.
the problem need return first result found specific criteria or if nothing found need return null when "split-tasks" done.
for (due fact i'm using recursiveaction instead of recursivetask) i'm able call method , "return;" when task found match thats smells bad.
all solutions tried implementing recursivetask needed go through whole map (doing splits) until return value.
is there possibility return given result , cancel task prevend furthing processing using recursivetask?
perhaps old so answer help. it's form of "short circuit" , need yourself. or can use package another.
Comments
Post a Comment