<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMSimpleQueue",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@T@CMSimpleQueueRef"
  },
  "title" : "CMSimpleQueue"
}
-->

# CMSimpleQueue

A reference to an instance that provides a simple lockless queue of elements.

```
class CMSimpleQueue
```

## Topics

### Managing Queues

[`enqueue(_:)`](/documentation/CoreMedia/CMSimpleQueue/enqueue(_:))

Enqueues an element in the queue.

[`dequeue()`](/documentation/CoreMedia/CMSimpleQueue/dequeue())

Dequeues an element from the queue.

[`reset()`](/documentation/CoreMedia/CMSimpleQueue/reset())

Resets the queue.

### Inspecting Queues

[`head`](/documentation/CoreMedia/CMSimpleQueue/head)

The head element in the queue.

[`capacity`](/documentation/CoreMedia/CMSimpleQueue/capacity)

The number of elements that a queue can hold.

[`count`](/documentation/CoreMedia/CMSimpleQueue/count)

The number of elements currently in the queue.

[`fullness`](/documentation/CoreMedia/CMSimpleQueue/fullness)

The fullness of a queue as a percentage of its capacity.

### Accessing the Type Identifier

[`typeID`](/documentation/CoreMedia/CMSimpleQueue/typeID)

The type identifier of sample buffer objects.

### Errors

[`CMSimpleQueue.Error`](/documentation/CoreMedia/CMSimpleQueue/Error)

A structure that defines errors that queue operations can produce.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)