summaryrefslogtreecommitdiffstats
path: root/wti.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-02 16:53:29 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-02 16:53:29 +0000
commit9b48c4a481c64503605f25e1d0648d24f43437f1 (patch)
tree017325a20b756a2047cb3eb7d9aacdf19a52d964 /wti.c
parent38f0cd67626ce56b0014b05b513e2e573da25e6f (diff)
downloadrsyslog-9b48c4a481c64503605f25e1d0648d24f43437f1.tar.gz
rsyslog-9b48c4a481c64503605f25e1d0648d24f43437f1.tar.xz
rsyslog-9b48c4a481c64503605f25e1d0648d24f43437f1.zip
begun working on time-window based dequeueing (and rate limiting in
general)
Diffstat (limited to 'wti.c')
-rw-r--r--wti.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/wti.c b/wti.c
index 2386dee9..c9184b36 100644
--- a/wti.c
+++ b/wti.c
@@ -370,6 +370,14 @@ wtiWorker(wti_t *pThis)
pthread_yield(); /* see big comment in function header */
# endif
+ /* if we have a rate-limiter set for this worker pool, let's call it. Please
+ * keep in mind that the rate-limiter may hold us for an extended period
+ * of time. -- rgerhards, 2008-04-02
+ */
+ if(pWtp->pfRateLimiter != NULL) {
+ pWtp->pfRateLimiter(pWtp->pUsr);
+ }
+
wtpSetInactivityGuard(pThis->pWtp, 0, LOCK_MUTEX); /* must be set before usr mutex is locked! */
BEGIN_MTX_PROTECTED_OPERATIONS(pWtp->pmutUsr, LOCK_MUTEX);