none
EnumerablePartitionerOptions.NoBuffering – partial support for dependencies between items

    Question

  • EnumerablePartitionerOptions.NoBuffering definition sais: “

    Create a partitioner that takes items from the source enumerable one at a time and does not use intermediate storage that can be accessed more efficiently by multiple threads. This option provides support for low latency (items will be processed as soon as they are available from the source) and provides partial support for dependencies between items (a thread cannot deadlock waiting for an item that the thread itself is responsible for processing).“.

    What exactly is ”partial support for dependencies between items”?

    Wednesday, April 5, 2017 8:43 AM

All replies

  • Hi User919,

    Thank you for posting here and sorry for late reply.

    >>What exactly is ”partial support for dependencies between items”?

    It has a good explanation in brackets a thread can not deadlock waiting for an item that the thread itself is responsible for processing. 

    Providing shared access to resources can create conflicts. To avoid conflicts, you must synchronize, or control the access to, shared resources. Failure to synchronize access properly (in the same or different application domains) can lead to problems such as deadlocks (in which two threads stop responding while each waits for the other to complete) and race conditions (when an anomalous result occurs due to an unexpected critical dependence on the timing of two events). The system provides synchronization objects that can be used to coordinate resource sharing among multiple threads. Reducing the number of threads makes it easier to synchronize resources.

    For more details, please refer to the MSDN article Threads and Threading.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, April 10, 2017 7:16 AM
    Moderator
  • Hi User919,

    Thank you for posting here and sorry for late reply.

    >>What exactly is ”partial support for dependencies between items”?

    It has a good explanation in brackets a thread can not deadlock waiting for an item that the thread itself is responsible for processing. 

    Providing shared access to resources can create conflicts. To avoid conflicts, you must synchronize, or control the access to, shared resources. Failure to synchronize access properly (in the same or different application domains) can lead to problems such as deadlocks (in which two threads stop responding while each waits for the other to complete) and race conditions (when an anomalous result occurs due to an unexpected critical dependence on the timing of two events). The system provides synchronization objects that can be used to coordinate resource sharing among multiple threads. Reducing the number of threads makes it easier to synchronize resources.

    For more details, please refer to the MSDN article Threads and Threading.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Hi Wendy,

    maybe I am closer to understand but I do not catch the main idea.

    Can you provide explanation or code examples for questions:

    1. What exactly are the dependencies between (source) items?
    2. When the partial support works an when does not?

    Thanks.

    U


    • Edited by User919 Saturday, December 16, 2017 4:38 PM
    Saturday, December 16, 2017 4:38 PM