Skip to content

Commit 233c599

Browse files
committed
Refactoring
1 parent 078d602 commit 233c599

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ int main(int argc, char **argv)
6464
for(unsigned int i=0;i<ITERATIONS;i++){
6565
SampleWorkerThread* myThread = new SampleWorkerThread(i);
6666
//cout << "myThread[" << myThread->id << "] = [" << myThread << "]" << endl;
67-
myPool->assignWork(myThread);
67+
myPool->assign_work(myThread);
6868
}
6969

7070
// destroy_pool(int maxPollSecs)

threadpool.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ void ThreadPool::destroy_pool(int maxPollSecs = 2)
7373
}
7474

7575

76-
bool ThreadPool::assignWork(WorkerThread *workerThread)
76+
bool ThreadPool::assign_work(WorkerThread *workerThread)
7777
{
7878
pthread_mutex_lock(&mutexWorkCompletion);
7979
_incomplete_work++;
80-
//cout << "assignWork...incomapleteWork=" << _incomplete_work << endl;
80+
//cout << "assign_work...incomapleteWork=" << _incomplete_work << endl;
8181
pthread_mutex_unlock(&mutexWorkCompletion);
8282

8383
sem_wait(&_available_thread);

threadpool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class ThreadPool{
4848

4949
void destroy_pool(int maxPollSecs);
5050

51-
bool assignWork(WorkerThread *worker);
51+
bool assign_work(WorkerThread *worker);
5252
bool fetchWork(WorkerThread **worker);
5353

5454
void initializeThreads();

0 commit comments

Comments
 (0)