31using std::ostream, std::map, std::cout, std::endl;
55 _stream <<
_task.threadID();
67 for (
size_t j = 0;
j < 4; ++
j )
69 cout <<
"+++++++++ Starting iteration #" <<
j <<
" ++++++++++++"<< endl;
70 for (
size_t i = 0; i <
numTasks; ++i) {
74 cout <<
"\n ****** Drain the tasks queue ******" << endl;
77 cout <<
"\n Stopping..." << endl;
91 if (found == counter.
end())
92 counter.insert(counter_t::value_type(iter->threadID(), 1));
94 found->second = found->second + 1;
99 cout <<
"\n************* RESULT ****************" << endl;
105 cout <<
"Thread " << iter->first <<
" was used " << iter->second <<
" times\n";
112 cout <<
"ThreadPool: the simple test status: " << (
testOK ?
"OK" :
"Failed") << endl;
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
const_iterator begin() const
const_iterator end() const
static Int_t Sleep(ULong_t secs, ULong_t nanos=0)
Static method to sleep the calling thread.
static Long_t SelfId()
Static method returning the id for the current thread.