Skip to content

Commit

Permalink
Fixing problem with previous commit
Browse files Browse the repository at this point in the history
...sorry committed wrong version of the file
  • Loading branch information
hkaiser committed May 16, 2017
1 parent d2f333b commit da51f54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime/agas/addressing_service.cpp
Expand Up @@ -310,7 +310,7 @@ bool addressing_service::register_locality(
locality_ns_->allocate(endpoints, 0, num_threads, prefix));

{
std::lock_guard<mutex_type> l(resolved_localities_mtx_);
std::unique_lock<mutex_type> l(resolved_localities_mtx_);
std::pair<resolved_localities_type::iterator, bool> res
= resolved_localities_.insert(std::make_pair(
prefix
Expand Down Expand Up @@ -1856,7 +1856,7 @@ void addressing_service::update_cache_entry(
const gva_cache_key key(gid, count);

{
std::lock_guard<mutex_type> lock(gva_cache_mtx_);
std::unique_lock<mutex_type> lock(gva_cache_mtx_);
if (!gva_cache_->update_if(key, g, check_for_collisions))
{
if (LAGAS_ENABLED(warning))
Expand All @@ -1868,7 +1868,7 @@ void addressing_service::update_cache_entry(
if (!gva_cache_->get_entry(key, idbase, e))
{
// This is impossible under sane conditions.
l.unlock();
lock.unlock();
HPX_THROWS_IF(ec, invalid_data
, "addressing_service::update_cache_entry"
, "data corruption or lock error occurred in cache");
Expand Down

0 comments on commit da51f54

Please sign in to comment.