[ 
https://issues.apache.org/jira/browse/MINIFI-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aldrin Piri updated MINIFI-209:
-------------------------------
    Affects Version/s:     (was: 0.1.0)
                       cpp-0.1.0

> 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: cpp-0.1.0
>            Reporter: marco polo
>             Fix For: cpp-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