Fix removing shared memory segments in a multi-process setup
This commit is contained in:
parent
cbfb055f81
commit
03d653c0bb
@ -46,6 +46,10 @@ class SharedMemoryDataFacade : public ContiguousInternalMemoryDataFacadeBase
|
|||||||
// if this returns false this is still in use
|
// if this returns false this is still in use
|
||||||
if (exclusive_lock.try_lock())
|
if (exclusive_lock.try_lock())
|
||||||
{
|
{
|
||||||
|
if (storage::SharedMemory::RegionExists(data_region))
|
||||||
|
{
|
||||||
|
BOOST_ASSERT(storage::SharedMemory::RegionExists(layout_region));
|
||||||
|
|
||||||
// Now check if this is still the newest dataset
|
// Now check if this is still the newest dataset
|
||||||
const boost::interprocess::sharable_lock<boost::interprocess::named_upgradable_mutex>
|
const boost::interprocess::sharable_lock<boost::interprocess::named_upgradable_mutex>
|
||||||
lock(shared_barriers->current_regions_mutex);
|
lock(shared_barriers->current_regions_mutex);
|
||||||
@ -65,6 +69,7 @@ class SharedMemoryDataFacade : public ContiguousInternalMemoryDataFacadeBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SharedMemoryDataFacade(const std::shared_ptr<storage::SharedBarriers> &shared_barriers_,
|
SharedMemoryDataFacade(const std::shared_ptr<storage::SharedBarriers> &shared_barriers_,
|
||||||
storage::SharedDataType layout_region_,
|
storage::SharedDataType layout_region_,
|
||||||
|
Loading…
Reference in New Issue
Block a user