marco polo created MINIFI-209:
---------------------------------

             Summary: Sleep not used judiciously
                 Key: MINIFI-209
                 URL: https://issues.apache.org/jira/browse/MINIFI-209
             Project: Apache NiFi MiNiFi
          Issue Type: Bug
          Components: C++
    Affects Versions: 0.1.0
            Reporter: marco polo
             Fix For: 0.2.0


void TimerDrivenSchedulingAgent::run(Processor *processor) attempts to use 
sleep as a flow control mechanism. An alternative would be to use condition 
variables to know when work is available and when to play fair. 

I don't tend to like sleep based yields since you have no concept of what work 
is available to run. Yield would be a preference as the I/O schedule will do a 
better job at determining which thread should run; however, we should 
investigate the cost/benefit of using a condition variable's notification 
mechanism.

I'm labeling this a bug since I've seen cases where no work was being performed 
for a period of time. This doesn't make sense as a timer can be achieved more 
intelligently with another mechanism. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to