thread-pool icon indicating copy to clipboard operation
thread-pool copied to clipboard

Missing functions to get the return of some tasks

Open zh820952173 opened this issue 1 year ago • 5 comments

wait_for_tasks is wait for all tasks to complete

zh820952173 avatar May 13 '24 03:05 zh820952173

Could you elaborate on what you would expect function wise?

ptsouchlos avatar May 13 '24 11:05 ptsouchlos

Lack of waiting for the specific task group to return。for example, results = pool.wailtTasks(futures)

zh820952173 avatar May 13 '24 14:05 zh820952173

Oh I see.

Hmm, I'm not sure that this type of functionality belongs in the thread pool, but maybe the library can provide some convenience function for working with futures.

ptsouchlos avatar May 13 '24 15:05 ptsouchlos

I think we need to have this feature。It would be even better if the library had this feature

zh820952173 avatar May 13 '24 15:05 zh820952173

wait_for_tasks is wait for all tasks. i hope wait_for_tasks(some tasks)

zh820952173 avatar May 13 '24 15:05 zh820952173

While I appreciate that this may be useful, this feature is beyond the scope of this library. I feel like it belongs in a concurrency library that works more generally with awaitable types or std::futures.

ptsouchlos avatar Jul 05 '24 16:07 ptsouchlos