It would be handy to be able to set a functor that gets invoked near the top of a newly spawned TBB worker thread. There are some things that I would like to do when TBB starts a worker thread. These are mostly for debugging related tasks, but don't just want to have it available in debug build. Some examples are to initialize a bit of thread local storage, track thread ids, set thread names (on linux, at least) and so forth.
Is there any existing mechanism to do this? Could one be added, if not?