Class QueueRef
TODO
Methods
QueueRef:Enqueue (data[, opts]) | DOCME |
QueueRef:EnqueueBulk (data[, opts]) | DOCME |
QueueRef:Size () | DOCME |
QueueRef:TryDequeue ([opts]) | DOCME |
QueueRef:TryDequeueBulk (n[, opts]) | DOCME |
QueueRef:TryEnqueue () | DOCME (as per Enqueue but will fail if queue full) |
QueueRef:TryEnqueueBulk () | DOCME (as per EnqueueBulk but will fail if queue full) |
Methods
- QueueRef:Enqueue (data[, opts])
-
DOCME
Parameters:
- data Bytes (as per Submit)
- opts table May include align: as per something, target blob key: expose this? (optional)
Returns:
-
boolean
OK?
- QueueRef:EnqueueBulk (data[, opts])
-
DOCME
Parameters:
- data {Bytes...} (as per Submit)
- opts
table
May also include
* count: Number of elements to enqueue; by default,
#data
. (optional)
Returns:
-
boolean
OK?
- QueueRef:Size ()
-
DOCME
Returns:
-
uint
approximate number of elements in queue (not exact since multiple threads might be hammering on it)
- QueueRef:TryDequeue ([opts])
-
DOCME
Parameters:
- opts
table
- key: stuff
- out: If a Blob, used as output and return value (swapping per Submit)
Returns:
-
Blob, string or nil
out
- opts
table
- QueueRef:TryDequeueBulk (n[, opts])
-
DOCME
Parameters:
- n uint
- opts
table
- key: stuff
- out: If a table, used as output and return value, but corresponding Blob entries used as per TryDequeue
Returns:
- uint N
- {Blob or string...}
Or
-
0 for no result
- QueueRef:TryEnqueue ()
- DOCME (as per Enqueue but will fail if queue full)
- QueueRef:TryEnqueueBulk ()
- DOCME (as per EnqueueBulk but will fail if queue full)