Skip to content

Commit

Permalink
Merge pull request #10440 from tchaikov/wip-16686
Browse files Browse the repository at this point in the history
msg/async: remove static member variable

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Haomai Wang <haomai@xsky.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
  • Loading branch information
tchaikov committed Jul 26, 2016
2 parents 74eafb4 + 76e7b69 commit 0b9eeaa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/msg/async/AsyncMessenger.cc
Expand Up @@ -342,8 +342,6 @@ class WorkerPool {
return coreids[id % coreids.size()];
}
void barrier();
// uniq name for CephContext to distinguish differnt object
static const string name;
};

void *Worker::entry()
Expand Down Expand Up @@ -376,8 +374,6 @@ void *Worker::entry()
/*******************
* WorkerPool
*******************/
const string WorkerPool::name = "AsyncMessenger::WorkerPool";

WorkerPool::WorkerPool(CephContext *c): cct(c), started(false),
barrier_lock("WorkerPool::WorkerPool::barrier_lock"),
barrier_count(0), pending(0)
Expand Down Expand Up @@ -521,7 +517,8 @@ AsyncMessenger::AsyncMessenger(CephContext *cct, entity_name_t name,
cluster_protocol(0), stopped(true)
{
ceph_spin_init(&global_seq_lock);
cct->lookup_or_create_singleton_object<WorkerPool>(pool, WorkerPool::name);
// uniq name for CephContext to distinguish from other objects
cct->lookup_or_create_singleton_object<WorkerPool>(pool, "AsyncMessenger::WorkerPool");
local_worker = pool->get_worker();
local_connection = new AsyncConnection(cct, this, &dispatch_queue, local_worker);
local_features = features;
Expand Down

0 comments on commit 0b9eeaa

Please sign in to comment.