Pull to refresh

Comments 4

do you know how I can programmatically limit threads number to 1 for debug?

I have used SemaphoreSlim class for such purpuses.

private readonly SemaphoreSlim syncObject = new SemaphoreSlim(1);
...
      syncObject.Wait();
      try {
        // CODE YOU WANT TO DEBUG
      }
      finally {
        syncObject.Release();
      }
Sign up to leave a comment.

Articles

Change theme settings