If multiple threads want to compile independent materials at the same time, do they
1.a) each want to use an own instance of the SDK,
1.b) want to use separate instances of the database and the compiler,
1.c) want to use their own compiler instances,
1.d) want to use separate databases,
1.e) none of the above?
What is variant advisable use, avoiding excessive locking?
If multiple threads want to translate expressions of the same material into separate programs (say surface, displacement, volume shaders) at the same time, is that possible?
If so, do they
2.a) want to use separate database instances,
2.b) want to use separate compiler instances,
2.c) want to use separate compiled material instances,
2.d) want to use separate backend instances,
2.e) only need to use separate link units?
What is combination is advisable use, avoiding excessive locking?
Knowing there’s LLVM under the hood, I guess that cooperative compilation/translation of a single program is not possible or at least not advisable (because it would only result in mutual exclusion)?
So the implied questions here are “which entity owns the ‘LLVMContext’?”, and “which requests can be processed concurrently and where are they serialized automatically?”