Skip to content

Instantly share code, notes, and snippets.

@shassaan
Created November 3, 2020 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shassaan/a57754f694e83ec679885f3ce95101ce to your computer and use it in GitHub Desktop.
Save shassaan/a57754f694e83ec679885f3ce95101ce to your computer and use it in GitHub Desktop.
AddDataInBlockingCollection
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