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

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -