Skip to content

Commit

Permalink
Revert "temporary patch for race condition"
Browse files Browse the repository at this point in the history
This reverts commit fe95598.
  • Loading branch information
adlarkin committed Aug 30, 2021
1 parent ad3ac95 commit 07feabb
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions include/ignition/gazebo/detail/EntityComponentManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <cstring>
#include <map>
#include <memory>
#include <mutex>
#include <optional>
#include <set>
#include <tuple>
Expand Down Expand Up @@ -487,9 +486,6 @@ void EntityComponentManager::EachRemoved(typename identity<std::function<
template<typename ...ComponentTypeTs>
detail::View<ComponentTypeTs...> *EntityComponentManager::FindView() const
{
static std::mutex mutex;
std::lock_guard<std::mutex> lock(mutex);

auto viewKey = std::vector<ComponentTypeId>{ComponentTypeTs::typeId...};

auto baseViewPtr = this->FindView(viewKey);
Expand All @@ -498,7 +494,6 @@ detail::View<ComponentTypeTs...> *EntityComponentManager::FindView() const
auto view = static_cast<detail::View<ComponentTypeTs...>*>(baseViewPtr);

// add any new entities to the view before using it
view->ToAddEntities();
for (const auto &[entity, isNew] : view->ToAddEntities())
{
view->AddEntityWithConstComps(entity, isNew,
Expand Down

0 comments on commit 07feabb

Please sign in to comment.