return coreids[id % coreids.size()];
}
void barrier();
- // uniq name for CephContext to distinguish differnt object
- static const string name;
};
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)
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;