I had some functionality to support something like that in Polyester before, but ripped it out as it wasn’t documented and I didn’t think anyone was using it, and I didn’t feel like maintaining it at the time.
Something like that could be added again, but wouldn’t it be better to just disable inner threading entirely, focusing on outer threading of your embarrassingly parallel program only?
That’d be easier to do without modifying f, and in fact is something you could already do without modifying the library.
t, r = PolyesterWeave.request_threads(PolyesterWeave.num_threads())
# Polyester, LoopVectorization's threading, and Octavian's threading are now disabled
foreach(PolyesterWeave.free_threads!, r)
# they're now reenabled