Created
February 1, 2026 13:13
-
-
Save wullemsb/a10213f6cc0f041c182cd6c5b4451446 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add parallelism with no extra code — just configure the blocks: | |
| var getFolderContents = new TransformManyBlock<string, string>( | |
| folder => Directory.GetFileSystemEntries(folder), | |
| new ExecutionDataflowBlockOptions { MaxDegreeOfParallelism = 4 }); | |
| var computeMD5 = new TransformBlock<string, (string FilePath, string Hash)>( | |
| filePath => /* ... */, | |
| new ExecutionDataflowBlockOptions { MaxDegreeOfParallelism = 8 }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment