Skip to content

Commit

Permalink
fix compile warning
Browse files Browse the repository at this point in the history
  • Loading branch information
chuangxie committed Feb 12, 2015
1 parent a77e0b2 commit 8fcdacb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void thpool_wait(thpool_* thpool_p){
/* Continuous polling */
double timeout = 1.0;
time_t start, end;
double tpassed;
double tpassed = 0.0;
time (&start);
while (tpassed < timeout &&
(thpool_p->jobqueue_p->len || thpool_p->num_threads_working))
Expand Down Expand Up @@ -232,7 +232,7 @@ void thpool_destroy(thpool_* thpool_p){
/* Give one second to kill idle threads */
double TIMEOUT = 1.0;
time_t start, end;
double tpassed;
double tpassed = 0.0;
time (&start);
while (tpassed < TIMEOUT && thpool_p->num_threads_alive){
bsem_post_all(thpool_p->jobqueue_p->has_jobs);
Expand Down

0 comments on commit 8fcdacb

Please sign in to comment.