TL;DR
Is it safe to share MIP File Engine object between multiple threads, each will use it to read a label from a different file?
The Longer Version
I'm working with Microsoft Information Protection SDK (from now on, I'll call it MIP) in order to develop a C# service that checks whether files are correctly labeled.
In order to check this, I need to create 3 objects:
- MIP Context
- Profile Engine
- File Engine
Microsoft documentation says regarding the MIP context that every process should construct only one context and it should reuse it, but, regarding the other two, I wasn't able to find any mention regarding concurrency / thread safeness / objects reuse.
It is expensive to create them for each request I'm serving. It can take up to 2-3 seconds just to construct the file engine.
What I tested? I assumed it is thread safe and used those objects concurrently while stress testing the system and it looks like everything works just fine, which is promising but I need more than that.
Thanks for the help!