Python code - Uses a multiprocessing pool and maps an array of strings. On each item in the array, a partial function is used to call a callback_function:
p = multiprocessing.Pool(1)
p.map(functools.partial(callback_function,
arg1 = arg1,
arg2 = arg2,
), array_string_items)
I am trying to do something similar in Java. I don't see anything in Java API's that is even remotely as simple as the Python code above.
1) Would using threads instead of a processor pool be more encouraged? 2) If so, how would I go about implementing this?
Thanks