ThreadInitTask not used for offloaded threads
I'm not sure how important this is at present, but probably worth noting for the future.
The Gaudi ThreadPoolSvc runs an initialise and finalise task in each thread: https://gitlab.cern.ch/gaudi/Gaudi/-/blob/master/GaudiHive/src/ThreadPoolSvc.cpp#L173
However when we launch an asynchronous or offloaded algorithm, an std::thread is used directly, without initialisation or finalisation: https://gitlab.cern.ch/gaudi/Gaudi/-/blob/master/GaudiHive/src/AvalancheSchedulerSvc.cpp#L922
This may also be related to difficulties I was having with thread finalisation once tbb::task_scheduler_init
is deprecated:
!1065 (closed)
May be obsoleted by proposed move to task groups: !1067 (merged)