System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'ReturnBuffer should not be disposed after it's parent operation context was disposed'.
at Sparrow.Json.JsonOperationContext.ReturnBuffer.ThrowParentWasDisposed()
at Sparrow.Json.JsonOperationContext.ReturnBuffer.Dispose()
at Sparrow.Json.JsonOperationContext.ParseToMemoryAsync(Stream stream, String documentId, UsageMode mode, Nullable`1 token)
at Raven.Client.Http.RavenCommand`1.<ProcessResponse>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Raven.Client.Http.RequestExecutor.<ExecuteAsync>d__69`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Raven.Client.Http.RequestExecutor.<ExecuteAsync>d__69`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Raven.Client.Documents.Session.AsyncDocumentSession.<LoadAsync>d__48`1.MoveNext()
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
public ValueTask<TValue> GetOrCreateAsync([NotNull] TKey key, [NotNull] Func<TKey, Task<TValue>> valueFactory) { this.ThrowArgumentNullException((object) key == null, nameof (key), (string) null); this.ThrowArgumentNullException(valueFactory == null, nameof (valueFactory), (string) null); this.AssertNotDisposed(); CachedValue<TKey, TValue> cachedValue; if (this._entries.TryGetValue(key, out cachedValue) && cachedValue != null && !cachedValue.CheckExpired(DateTimeOffset.UtcNow.Ticks)) return new ValueTask<TValue>(cachedValue.Value); return this.AwaitableFactory(valueFactory, key); }
private async ValueTask<TValue> AwaitableFactory(Func<TKey, Task<TValue>> valueFactory, TKey key) { await this._semaphoreSlim.WaitAsync(); try { CachedValue<TKey, TValue> entry; if (this._entries.TryGetValue(key, out entry) && entry != null) { if (!entry.CheckExpired(DateTimeOffset.UtcNow.Ticks)) return entry.Value; this._entries.Remove(key); } TValue obj = await valueFactory(key); TValue value = obj; obj = default (TValue); this._entries.Add(key, CachedValue<TKey, TValue>.New(key, value, this._expirationMode, this._expiration)); return value; } finally { this._semaphoreSlim.Release(); this.StartScanForExpiredItems(); } }
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.