ability to get the progress on a Future object

前端 未结 3 1241
我寻月下人不归
我寻月下人不归 2021-02-05 14:20

With reference to the java.util.concurrent package and the Future interface I notice (unless I am mistaken) that the ability to start a lengthy tasks and be able to query on the

3条回答
  •  面向向阳花
    2021-02-05 14:54

    In my case I passed a HashSet, with the Objects to process, as Parameter to the Method, wich was created as instance variable in the calling Class. When the asyncronous method removes the Objects after processing one can retrieve the size of the Map remaining in the calling Method. I thing in general passing Objects by Reference solves the Problem.

提交回复
热议问题