kupl_queue_acquire
Obtain queue handles by sequence number.
Interface Definition
kupl_queue_h kupl_queue_acquire(int index);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
index |
int |
Sequence number of a queue. KUPL_ASYNC_SYNC indicates a synchronous queue. |
Input |
Return Value
Success: A queue handle is returned.
Failure: nullptr
Examples
1 2 3 4 5 6 7 8 9 | #include <stdio.h> #include "kupl.h" int main() { kupl_queue_h queue = kupl_queue_acquire(1); kupl_queue_destroy(queue); return 0; } |
The preceding example demonstrates how to obtain a queue numbered 1 and then destroy it. After obtaining a queue, you do not need to destroy it. It will be automatically destroyed after the program ends.
Parent topic: Multi-queue Multi-stream Programming Functions