title: C# ConcurrentDictionary used by 3 threads
body: <p>I have a class that uses a <code>ConcurrentDictionary</code>.</p>
  
  <p>In this class, there are three functions that perform some operations on this <code>ConcurrentDictionnary</code>.</p>
  
  <p>Each function is called by a different thread.</p>
  
  <ul>
  <li>First function operations : dictionnary.Where, dictionnary.TryRemove</li>
  <li>Second function operations : dictionnary.Where</li>
  <li>Third function operations : dictionnary.TryAdd</li>
  </ul>
  
  <hr>
  
  <pre><code>while (!dictionnaryKey.TryAdd(key, item))
  {
    LogWriter.error_log("try add to dictionnary ...");
  }
  </code></pre>
  
  <p>This last function blocks at different times. I have to add my element to the dictionary without blocking, but how can I do?</p>