From 772cba6f2e34660fa74a7e2f5ec2823a2cdb6b04 Mon Sep 17 00:00:00 2001 From: Pavel Levshin Date: Wed, 6 Nov 2013 18:37:47 +0100 Subject: improve worker thread pool handling among others, make possible that workers really timeout and the pool thus shrinks --- runtime/wtp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/wtp.h') diff --git a/runtime/wtp.h b/runtime/wtp.h index 25992f7f..697722af 100644 --- a/runtime/wtp.h +++ b/runtime/wtp.h @@ -56,7 +56,7 @@ struct wtp_s { void *pUsr; /* pointer to user object (in this case, the queue the wtp belongs to) */ pthread_attr_t attrThrd;/* attribute for new threads (created just once and cached here) */ pthread_mutex_t *pmutUsr; - pthread_cond_t *pcondBusy; /* condition the user will signal "busy again, keep runing" on (awakes worker) */ + pthread_cond_t *pcondBusy; /* unused condition variable, was used to signal threads to wake up */ rsRetVal (*pfChkStopWrkr)(void *pUsr, int); rsRetVal (*pfGetDeqBatchSize)(void *pUsr, int*); /* obtains max dequeue count from queue config */ rsRetVal (*pfObjProcessed)(void *pUsr, wti_t *pWti); /* indicate user object is processed */ -- cgit v1.2.3 From 248e6bf819312e6ab43df0e46269080a8518a2f9 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 7 Nov 2013 12:25:46 +0100 Subject: cleanup no longer needed code --- runtime/wtp.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'runtime/wtp.h') diff --git a/runtime/wtp.h b/runtime/wtp.h index 697722af..4bc284cb 100644 --- a/runtime/wtp.h +++ b/runtime/wtp.h @@ -56,7 +56,6 @@ struct wtp_s { void *pUsr; /* pointer to user object (in this case, the queue the wtp belongs to) */ pthread_attr_t attrThrd;/* attribute for new threads (created just once and cached here) */ pthread_mutex_t *pmutUsr; - pthread_cond_t *pcondBusy; /* unused condition variable, was used to signal threads to wake up */ rsRetVal (*pfChkStopWrkr)(void *pUsr, int); rsRetVal (*pfGetDeqBatchSize)(void *pUsr, int*); /* obtains max dequeue count from queue config */ rsRetVal (*pfObjProcessed)(void *pUsr, wti_t *pWti); /* indicate user object is processed */ @@ -95,6 +94,5 @@ PROTOTYPEpropSetMeth(wtp, iMaxWorkerThreads, int); PROTOTYPEpropSetMeth(wtp, pUsr, void*); PROTOTYPEpropSetMeth(wtp, iNumWorkerThreads, int); PROTOTYPEpropSetMethPTR(wtp, pmutUsr, pthread_mutex_t); -PROTOTYPEpropSetMethPTR(wtp, pcondBusy, pthread_cond_t); #endif /* #ifndef WTP_H_INCLUDED */ -- cgit v1.2.3