bakaid commented on a change in pull request #735: WIP: MINIFICPP-1158 - Event driven processors can starve each other URL: https://github.com/apache/nifi-minifi-cpp/pull/735#discussion_r381985684
########## File path: libminifi/include/utils/ThreadPool.h ########## @@ -170,7 +142,7 @@ template<typename T> class WorkerComparator { public: bool operator()(Worker<T> &a, Worker<T> &b) { - return a.getTimeSlice() < b.getTimeSlice(); + return a.getTimeSlice() > b.getTimeSlice(); Review comment: I don't mind breaking API to a certain extent to fix a critical bug as this is, but this breaks API in a dangerous way: it will compile, but do the opposite of what it did so far. So far this has been the comparator for the `worker_priority_queue_`, now it is used for the `delayed_worker_queue_`. I would prefer if this functor was renamed `DelayedWorkerComparator`, so that it would break API in a safe way and would be more straightforward. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services