Use one single std::lock_guard in Run(), and replace the manual Lock()/Unlock() calls.
Attach a file by drag & drop or click to upload