cross-platform / dspatch

The Refreshingly Simple Cross-Platform C++ Dataflow / Patching / Pipelining / Graph Processing / Stream Processing / Reactive Programming Framework
https://flowbasedprogramming.com/
BSD 2-Clause "Simplified" License
220 stars 44 forks source link

Can you give some examples of using every combination of ProcessOrder and TickMode? #21

Closed vacing closed 4 years ago

vacing commented 4 years ago
    enum class ProcessOrder
    {
        InOrder,
        OutOfOrder
    };

    enum class TickMode
    {
        Series,
        Parallel
    };

Because of the sharing state in a Component, I can only think out the situation I need InOrder and Series( and independent thread pushed Component). InOrder + Parrellel equals to Series?

Best regards. vacing

vacing commented 4 years ago

I noticed the issue here, give some explanation: https://github.com/cross-platform/dspatch/issues/16

According to this issue, Series and Parrel are refer to the working mode of Circuit, not Component it self, a component only work in one thread(no matter the Circuit thread or the thread of the Component it self)? if so, why need I set buffer count ?

MarcusTomlinson commented 4 years ago

Think of buffers as circuit-level threads. The question your asking yourself here is: Do I want components to start processing buffer x+1 as soon as they’re done with buffer x? That is, while the components ahead in a circuit process buffer x, should the components behind get on with buffer x+1?

MarcusTomlinson commented 4 years ago

TickMode is a question of: Do I want the branches of this circuit processed in parallel?

Buffer count is a question of: Do I want the buffers of this circuit processed in parallel?

ProcessOrder is a question of: Do I want the buffers passing through this component processed in order?