diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-02 16:53:29 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-02 16:53:29 +0000 |
commit | 9b48c4a481c64503605f25e1d0648d24f43437f1 (patch) | |
tree | 017325a20b756a2047cb3eb7d9aacdf19a52d964 /wti.c | |
parent | 38f0cd67626ce56b0014b05b513e2e573da25e6f (diff) | |
download | rsyslog-9b48c4a481c64503605f25e1d0648d24f43437f1.tar.gz rsyslog-9b48c4a481c64503605f25e1d0648d24f43437f1.tar.bz2 rsyslog-9b48c4a481c64503605f25e1d0648d24f43437f1.zip |
begun working on time-window based dequeueing (and rate limiting in
general)
Diffstat (limited to 'wti.c')
-rw-r--r-- | wti.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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); |