Skip to content

Commit 078d602

Browse files
committed
Refactoring
1 parent 7d33cef commit 078d602

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ int main(int argc, char **argv)
6767
myPool->assignWork(myThread);
6868
}
6969

70-
// destroyPool(int maxPollSecs)
70+
// destroy_pool(int maxPollSecs)
7171
// Before actually destroying the ThreadPool, this function checks if all the pending work is completed.
7272
// If the work is still not done, then it will check again after maxPollSecs
7373
// The default value for maxPollSecs is 2 seconds.
7474
// And ofcourse the user is supposed to adjust it for his needs.
7575

76-
myPool->destroyPool(2);
76+
myPool->destroy_pool(2);
7777

7878
time_t t2=time(NULL);
7979
cout << t2-t1 << " seconds elapsed\n" << endl;

threadpool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ ThreadPool::~ThreadPool()
5757

5858

5959

60-
void ThreadPool::destroyPool(int maxPollSecs = 2)
60+
void ThreadPool::destroy_pool(int maxPollSecs = 2)
6161
{
6262
while( _incomplete_work>0 )
6363
{

threadpool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ThreadPool{
4646
explicit ThreadPool(unsigned int num_thread);
4747
virtual ~ThreadPool();
4848

49-
void destroyPool(int maxPollSecs);
49+
void destroy_pool(int maxPollSecs);
5050

5151
bool assignWork(WorkerThread *worker);
5252
bool fetchWork(WorkerThread **worker);

0 commit comments

Comments
 (0)