Image Gradient: Switch to shared_mutex (#6558)
* Improve lock contention by switching to a shared_lock. ImageGradient is accessed via a many-reader-one-writer pattern, so a shared_lock causes less contention in the common "read" case. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Remove chatty profile marker. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
This commit is contained in:
@@ -94,6 +94,6 @@ namespace GradientSignal
|
||||
private:
|
||||
ImageGradientConfig m_configuration;
|
||||
LmbrCentral::DependencyMonitor m_dependencyMonitor;
|
||||
mutable AZStd::recursive_mutex m_imageMutex;
|
||||
mutable AZStd::shared_mutex m_imageMutex;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user