Skip to content

Instantly share code, notes, and snippets.

@Criteo-dotnet-blog
Created September 28, 2018 13:26
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 Criteo-dotnet-blog/5dbf6e6880778e5a966d4df090937a2a to your computer and use it in GitHub Desktop.
Save Criteo-dotnet-blog/5dbf6e6880778e5a966d4df090937a2a to your computer and use it in GitHub Desktop.
_workers = new Task[workerCount];
for (int i = 0; i < workerCount; i++)
{
_workers[i] = Task.Run(async () =>
{
while (true)
{
lock (_lock)
{
Thread.Sleep(5);
}
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment