MCPcopy Create free account
hub / github.com/cameron314/readerwriterqueue / peek

Method peek

readerwriterqueue.h:926–929  ·  view source on GitHub ↗

Returns a pointer to the front element in the queue (the one that would be removed next by a call to `try_dequeue` or `pop`). If the queue appears empty at the time the method is called, nullptr is returned instead. Must be called only from the consumer thread.

Source from the content-addressed store, hash-verified

924 // returned instead.
925 // Must be called only from the consumer thread.
926 AE_FORCEINLINE T* peek() const AE_NO_TSAN
927 {
928 return inner.peek();
929 }
930
931 // Removes the front element from the queue, if any, without returning it.
932 // Returns true on success, or false if the queue appeared empty at the time

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected