Results for “queue”
Small, practical examples. Search by task or narrow things down below.
Build a minimum-priority queue
C++: Supply greater as the comparator because priority_queue defaults to the largest value first.
C++✓ Tested
Finish all queued animations immediately
jQuery: finish jumps current and queued animations to their final values.
jQuery✓ Tested
Observe completion of queued work
jQuery: The queue promise resolves when the selected elements’ queue is empty.
jQuery✓ Tested
Process a FIFO queue
C#: Queue removes elements in the order they were enqueued.
C#✓ Tested
Process a first-in first-out queue
C++: Queue exposes its front item separately from the operation that removes it.
C++✓ Tested
Queue values in a buffered channel
Queue values in a buffered channel using a complete Go program with explicit sample inputs.
Go✓ Tested
Reject insertion when a fixed queue is full
Arduino / C: Track a count separately from circular read and write positions.
Arduino / C✓ Tested
Retrieve the smallest queued value first
Java: PriorityQueue poll removes the smallest value under the natural ordering.
Java✓ Tested
Sequence work on an element’s queue
jQuery: A queue callback calls next to allow the following callback to run.
jQuery✓ Tested
Start a named queue explicitly
jQuery: Named queues wait until dequeue starts them.
jQuery✓ Tested
Use a deque as a FIFO queue
Java: Add at the tail and remove at the head using ArrayDeque.
Java✓ Tested
Expose observation without exposing resolution
jQuery: promise returns an interface without resolve or reject methods.
jQuery✓ Tested