PTL icon indicating copy to clipboard operation
PTL copied to clipboard

Use cases for `TaskManager` and `TaskRunManager`?

Open drbenmorgan opened this issue 11 months ago • 0 comments

In preparing some material on the use of PTL for the Geant4 project and the LHCb experiment, I'm somewhat confused by the PTL::TaskManager and PTL::TaskRunManager classes are so wanted to clarify a few questions.

  1. Most simply, what are the use cases for these classes vs direct use of PTL::TaskGroup and/or PTL::ThreadPool?
  2. What's the case for having the default (static, global) threadpool instance used in PTL::TaskGroup managed by PTL::TaskRunManager rather than as a local static of a free function?
  3. Are any of the member functions of PTL::TaskManager other than the async ones relevant now, or rather, why have trivial wrappers/reproducers of functions directly available in the interface of PTL::TaskGroup like wrap and exec?

I realise I'm probably missing something here, but am wondering if some simplification/reduction is possible. This is also relevant for experiments using TBB and making PTL's ability to use this as clear and straightforward to integrate as possible.

drbenmorgan avatar Jan 06 '25 17:01 drbenmorgan