diff --git a/examples/C++/HelloWorldExample/HelloWorldSubscriber.cpp b/examples/C++/HelloWorldExample/HelloWorldSubscriber.cpp index f70cce146c8..fa138557e7a 100644 --- a/examples/C++/HelloWorldExample/HelloWorldSubscriber.cpp +++ b/examples/C++/HelloWorldExample/HelloWorldSubscriber.cpp @@ -114,6 +114,6 @@ void HelloWorldSubscriber::run() void HelloWorldSubscriber::run(uint32_t number) { std::cout << "Subscriber running until "<< number << "samples have been received"<m_listener.n_samples) + while(number > this->m_listener.n_samples) eClock::my_sleep(500); } diff --git a/src/cpp/publisher/PublisherImpl.h b/src/cpp/publisher/PublisherImpl.h index 70897af0bc9..46ddf87f5fc 100644 --- a/src/cpp/publisher/PublisherImpl.h +++ b/src/cpp/publisher/PublisherImpl.h @@ -94,12 +94,6 @@ class PublisherImpl */ bool removeAllChange(size_t* removed); - /** - * Get the number of elements in the History. - * @return Number of elements in the History. - */ - size_t getHistoryElementsNumber(); - /** * * @return diff --git a/src/cpp/rtps/history/CacheChangePool.cpp b/src/cpp/rtps/history/CacheChangePool.cpp index f0870333f62..a8507b3f7f0 100644 --- a/src/cpp/rtps/history/CacheChangePool.cpp +++ b/src/cpp/rtps/history/CacheChangePool.cpp @@ -44,8 +44,6 @@ CacheChangePool::~CacheChangePool() CacheChangePool::CacheChangePool(int32_t pool_size, uint32_t payload_size, int32_t max_pool_size, MemoryManagementPolicy_t memoryPolicy) : mp_mutex(new std::mutex()), memoryMode(memoryPolicy) { - std::lock_guard guard(*this->mp_mutex); - //Common for all modes: Set the payload size (maximum allowed), size and size limit ++pool_size; logInfo(RTPS_UTILS,"Creating CacheChangePool of size: "<< pool_size << " with payload of size: " << payload_size); diff --git a/test/performance/LatencyTestPublisher.cpp b/test/performance/LatencyTestPublisher.cpp index dd6c7e78e4d..a6bcd6fb4db 100644 --- a/test/performance/LatencyTestPublisher.cpp +++ b/test/performance/LatencyTestPublisher.cpp @@ -575,7 +575,7 @@ bool LatencyTestPublisher::test(uint32_t datasize) size_t removed=0; mp_datapub->removeAllChange(&removed); //cout << " REMOVED: "<< removed<removeAllChange(&removed); // cout << "REMOVED: "<< removed< m_times; diff --git a/utils/pcTests/ZMQTests/LatencyZMQ/ZeroMQPublisher.cpp b/utils/pcTests/ZMQTests/LatencyZMQ/ZeroMQPublisher.cpp index 3dd6e8a633f..06a5447d9d3 100644 --- a/utils/pcTests/ZMQTests/LatencyZMQ/ZeroMQPublisher.cpp +++ b/utils/pcTests/ZMQTests/LatencyZMQ/ZeroMQPublisher.cpp @@ -150,14 +150,14 @@ bool ZeroMQPublisher::test(uint32_t datasize) m_clock.setTimeNow(&m_t2); m_times.push_back(TimeConv::Time_t2MicroSecondsDouble(m_t2) -TimeConv::Time_t2MicroSecondsDouble(m_t1)-m_overhead); - analizeTimes(datasize); + analyzeTimes(datasize); printStat(m_stats.back()); return true; } -void ZeroMQPublisher::analizeTimes(uint32_t datasize) +void ZeroMQPublisher::analyzeTimes(uint32_t datasize) { TimeStats TS; TS.nbytes = datasize+4; @@ -214,12 +214,12 @@ bool ZeroMQPublisher::test(uint32_t datasize) m_times.push_back(time); } - analizeTimes(datasize); + analyzeTimes(datasize); printStat(m_stats.back()); return true; } -void ZeroMQPublisher::analizeTimes(uint32_t datasize) +void ZeroMQPublisher::analyzeTimes(uint32_t datasize) { TimeStats TS; TS.nbytes = datasize+4; diff --git a/utils/pcTests/ZMQTests/LatencyZMQ/ZeroMQPublisher.h b/utils/pcTests/ZMQTests/LatencyZMQ/ZeroMQPublisher.h index 0bc885b8457..59d21cc60e3 100644 --- a/utils/pcTests/ZMQTests/LatencyZMQ/ZeroMQPublisher.h +++ b/utils/pcTests/ZMQTests/LatencyZMQ/ZeroMQPublisher.h @@ -45,7 +45,7 @@ class ZeroMQPublisher { virtual ~ZeroMQPublisher(); bool init(std::vectorsubIP,int n_samples=1000); void run(); - void analizeTimes(uint32_t datasize); + void analyzeTimes(uint32_t datasize); bool test(uint32_t datasize); void printStat(TimeStats& TS); std::vector m_times;