Skip to content

Commit 7aa9eaa

Browse files
committed
Refactoring
1 parent 7457dc2 commit 7aa9eaa

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
@@ -55,9 +55,9 @@ int main(int argc, char **argv)
5555
//ThreadPool(N);
5656
//Create a Threadpool with N number of threads
5757
ThreadPool* myPool = new ThreadPool(2);
58-
myPool->initializeThreads();
58+
myPool->initialize_thread();
5959

60-
//We will count time elapsed after initializeThreads()
60+
//We will count time elapsed after initialize_thread()
6161
time_t t1=time(NULL);
6262

6363
//Lets start bullying ThreadPool with tonnes of work !!!

threadpool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ThreadPool::ThreadPool(unsigned int num_thread)
3939
pthread_mutex_unlock(&mutexSync);
4040
}
4141

42-
void ThreadPool::initializeThreads()
42+
void ThreadPool::initialize_thread()
4343
{
4444
for (unsigned int i = 0; i < _num_thread; ++i)
4545
{

threadpool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class ThreadPool{
5151
bool assign_work(WorkerThread *worker);
5252
bool fetch_work(WorkerThread **worker);
5353

54-
void initializeThreads();
54+
void initialize_thread();
5555

5656
static void *threadExecute(void *param);
5757

0 commit comments

Comments
 (0)