private void EnqueueAndSuccess(Offer <TOut> offer) { _buffer.Enqueue(offer.Element); offer.CompletionSource.NonBlockingTrySetResult(QueueOfferResult.Enqueued.Instance); }
/// <summary> /// TBD /// </summary> /// <param name="element">TBD</param> public void Enqueue(T element) => _q.Enqueue(element);
// Receive updates from the backend, parse them and delegate to the // classes in charge of creating, deleting and updating game objects. void RenderGameState(GameStateDTO gameStateDTO) { gameStateBuffer.Enqueue(gameStateDTO); }
public void TestPop() { var a = new GameStateDTO(); Assert.IsFalse(buffer.HasNext()); buffer.Enqueue(a); Assert.IsTrue(buffer.HasNext()); Assert.AreEqual(buffer.Pop(), a); }
private void EnqueueAndSuccess(TOut element, Offered promise) { _buffer.Enqueue(element); promise.SetResult(QueueOfferResult.Enqueued.Instance); }