diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-04-22 15:06:45 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-04-22 15:06:45 +0200 |
commit | 7667845bd72b6f92eabc975318a4f288a77f2630 (patch) | |
tree | 54b839ee7b3ae5347145bf4c721600ce5ca411b5 /runtime/queue.h | |
parent | b0cfe39c851de0851d88e1b6a51bf40a76fb8304 (diff) | |
download | rsyslog-7667845bd72b6f92eabc975318a4f288a77f2630.tar.gz rsyslog-7667845bd72b6f92eabc975318a4f288a77f2630.tar.xz rsyslog-7667845bd72b6f92eabc975318a4f288a77f2630.zip |
first attempt at dequeueing multiple batches inside the queue
... but this code has serious problems when terminating the queue, also
it is far from being optimal. I will commit a series of patches (hopefully)
as I am on the path to the final implementation.
Diffstat (limited to 'runtime/queue.h')
-rw-r--r-- | runtime/queue.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/queue.h b/runtime/queue.h index a267862d..7ecb9294 100644 --- a/runtime/queue.h +++ b/runtime/queue.h @@ -54,6 +54,7 @@ typedef struct qWrkThrd_s { pthread_mutex_t mut; } qWrkThrd_t; /* type for queue worker threads */ + /* the queue object */ typedef struct queue_s { BEGINobjInstance; @@ -84,6 +85,7 @@ typedef struct queue_s { int toActShutdown; /* timeout for long-running action shutdown in ms */ int toWrkShutdown; /* timeout for idle workers in ms, -1 means indefinite (0 is immediate) */ int toEnq; /* enqueue timeout */ + int iDeqMaxAtOnce; /* max number of elements that shall be dequeued at once */ /* rate limiting settings (will be expanded) */ int iDeqSlowdown; /* slow down dequeue by specified nbr of microseconds */ /* end rate limiting */ @@ -97,7 +99,7 @@ typedef struct queue_s { * applied to detect user configuration errors (and tell me how should we detect what * the user really wanted...). -- rgerhards, 2008-04-02 */ - /* ane dequeue time window */ + /* end dequeue time window */ rsRetVal (*pConsumer)(void *,void*); /* user-supplied consumer function for dequeued messages */ /* calling interface for pConsumer: arg1 is the global user pointer from this structure, arg2 is the * user pointer that was dequeued (actual sample: for actions, arg1 is the pAction and arg2 is pointer |