Coffeehouse Post

Single Post Permalink

View Thread: Does Parallel.ForEach only return when ALL iterations have completed?
  • User profile image
    Blue Ink

    , BitFlipper wrote

    *snip*

    Here's a bit of a complication with the DeleteFolderRecursive method... In my actual implementation I need to selectively delete folders. The tree structure I'm trying to delete is a build tree and one part of it contains a cache for components that we retrieve via network from a build farm instead of building it locally. So in addition to passing in just a folder, I do the following...

    *snip*

    I guess you should get marginally better performance by using the Directory.EnumerateXxx methods instead of the GetXxx ones.

    Not a major improvement, but might be worth a try.

    The only obvious disadvantage is that you cannot report progress.