Created
November 3, 2020 12:12
-
-
Save shassaan/a57754f694e83ec679885f3ce95101ce to your computer and use it in GitHub Desktop.
AddDataInBlockingCollection
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
BlockingCollection<int> data = new BlockingCollection<int>(); | |
Task t1 = Task.Run(() =>{ | |
data .Add(1); | |
data .Add(2); | |
data .Add(3); | |
data .CompleteAdding(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment