none
Ordering output from DataFlowBlocks (TPL) RRS feed

  • Question

  • Hi ,

    I am using TPL to process millions of data and output these processed data in an order.

    i am providing you an example as below,

    int input[1000000];       //millions of input data

    int output[1000000];     // output array

    I break input array into multiple chunks and pass into ITragetBlock which is linked to ISourceBlock

    Here ITargetBlock  process the input data and ISourceBlock insert the the processed data to output[].

    So multiple pipelines are created and each process the chunk of input data.

    My requirement here is that output array (output[] ) should be filled in an order, not randomly.  Now, its not happening and it gets inserted randomly since the completion of dataflowblocks are not happening in sequence.

    Kindly help.

    Monday, December 26, 2016 4:32 AM

All replies

  • What you're describing should work, as long as the MaxDegreeOfParallelism of the second block has the default value of 1. Could you include short code sample that demonstrates your issue?
    Monday, January 23, 2017 5:51 PM