/// <summary>
 /// Unregister deferred result.
 /// </summary>
 /// <param name="result">Result to unregister.</param>
 internal void UnregisterDeferredResult(DeferredResult result)
 {
     ReaderWriterLock.AcquireWriterLock();
     try
     {
         _deferredResults.Remove(result);
     }
     finally
     {
         ReaderWriterLock.ReleaseWriterLock();
     }
 }
 /// <summary>
 /// Registers deferred result.
 /// </summary>
 /// <param name="result">Result to register.</param>
 internal void RegisterDeferredResult(DeferredResult result)
 {
     ReaderWriterLock.AcquireWriterLock();
     try
     {
         _deferredResults.Add(result, null);
     }
     finally
     {
         ReaderWriterLock.ReleaseWriterLock();
     }
 }