I have a potentially long-running process in my add-in that processes a layout. Ideally I need to ensure the user cannot make changes to the layout and everything in the project it references, including maps and map layers, until this process is complete. The process makes no changes to anything in the layout or the project, only reads. What is the best strategy? I see elsewhere that cloning the layout is possible, but I would also need to clone the maps and layers. This seems an excessive demand. I've found the C# lock statement, but it does not allow use of await. There are a significant number of awaited calls to QueuedTask.Run() in the code.
Any suggestions or advice appreciated. I'm at Pro SDK 2.4.