TaskQueue

@Serializable
class TaskQueue

TaskQueue - A queue implementation for managing TaskElement instances.

All mutating reads/writes are guarded by queueLock so index-based removal cannot race with concurrent enqueue/dequeue (e.g. BLE disconnect clearing the queue on one thread while another updates the queue).

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Removes and returns the specified TaskElement from the queue. If the element is not found, logs a warning and returns null.

Link copied to clipboard
fun enqueue(element: TaskElement)

Adds a TaskElement to the queue.

Link copied to clipboard

Returns a copy of the full queue.