Ignore:
Timestamp:
03/25/15 14:28:31 (6 years ago)
Author:
Richard Sanger <rsangerarj@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
5e43b8b
Parents:
a330384
Message:

Move reporter threashold check to after adding the next item, so it makes more sense
in the case the threashold is set to 1.

Add logic to the order combiner allowing multiple results with the same key
to be sent even if all queues are not full.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/combiner_unordered.c

    r62b3c4e rf01c479  
    1919static void publish(libtrace_t *trace, int t_id, libtrace_combine_t *c, libtrace_result_t *res) {
    2020        libtrace_queue_t *queue = &((libtrace_queue_t*)c->queues)[t_id];
     21        libtrace_deque_push_back(queue, res); // Automatically locking for us :)
     22
    2123        if (libtrace_deque_get_size(queue) >= trace->config.reporter_thold) {
    2224                trace_post_reporter(trace);
    2325        }
    24         libtrace_deque_push_back(queue, res); // Automatically locking for us :)
    2526}
    2627
Note: See TracChangeset for help on using the changeset viewer.