Skip to content
Snippets Groups Projects
Commit 87decf42 authored by Joseph Boudreau's avatar Joseph Boudreau
Browse files

TEST the ATHENA pipeline without mutex in the modified GeoLogVol

parent 4115c6b6
No related branches found
No related tags found
1 merge request!320Deal with mutable materials such as a gas mixture.
Pipeline #7378044 passed
......@@ -18,8 +18,8 @@
#include "GeoModelKernel/GeoMaterial.h"
#include <vector>
#include <thread>
#include <shared_mutex>
#include <mutex>
//JFB #include <shared_mutex>
//JFB #include <mutex>
class GeoLogVol : public RCBase
{
public:
......@@ -37,13 +37,13 @@ class GeoLogVol : public RCBase
// Returns the material of the logical volume.
const GeoMaterial* getMaterial () const {
std::shared_lock lock{m_mutex};
//JFB std::shared_lock lock{m_mutex};
return m_material;
}
// In some cases (gases, liquids) materials be updated?
void setMaterial (const GeoMaterial *newMaterial) const {
std::unique_lock guards{m_mutex};
//JFB std::unique_lock guards{m_mutex};
m_material = newMaterial;
}
......@@ -57,7 +57,7 @@ class GeoLogVol : public RCBase
// Material composition of this volume.
mutable GeoIntrusivePtr<const GeoMaterial> m_material{};
mutable std::shared_mutex m_mutex{};
//JFB mutable std::shared_mutex m_mutex{};
// Shape of this volume.
GeoIntrusivePtr<const GeoShape> m_shape{};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment