Regarding the new tread scheduler and external code that uses threads (discussed a lot at JC19) - just a thought I had, no idea if it’s feasible:
What if a partr task could (optionally) request more than one thread? Kinda like requesting a multi-threaded job on a batch cluster? Depending on the external multi-threaded code, those threads could then just stay blocked until the Julia task (and therefore the external code) are done - some external code may even allow for utilizing the blocked threads directly, if it’s C-API has a mechanism for passing (system) thread-ids.
Just an idea, I realize that this is a complex issue.