clear_message_queueT_clear_message_queueClearMessageQueueClearMessageQueue (Operator)

Name

clear_message_queueT_clear_message_queueClearMessageQueueClearMessageQueue — Close a message queue handle and release all associated resources.

Signature

clear_message_queue( : : QueueHandle : )

Herror T_clear_message_queue(const Htuple QueueHandle)

void ClearMessageQueue(const HTuple& QueueHandle)

static void HMessageQueue::ClearMessageQueue(const HMessageQueueArray& QueueHandle)

void HMessageQueue::ClearMessageQueue() const

static void HOperatorSet.ClearMessageQueue(HTuple queueHandle)

static void HMessageQueue.ClearMessageQueue(HMessageQueue[] queueHandle)

void HMessageQueue.ClearMessageQueue()

Description

clear_message_queueclear_message_queueClearMessageQueueClearMessageQueueClearMessageQueue closes a message queue handle QueueHandleQueueHandleQueueHandleQueueHandlequeueHandle that was previously opened with create_message_queuecreate_message_queueCreateMessageQueueCreateMessageQueueCreateMessageQueue. Any resources owned by the message queue, in particular message data queued in the message queue will be released.

Multiple message queue handles can be closed in a single clear_message_queueclear_message_queueClearMessageQueueClearMessageQueueClearMessageQueue call, passing them as a tuple to the QueueHandleQueueHandleQueueHandleQueueHandlequeueHandle parameter.

Attention

The handle(s) must not be used again after being invalidated using clear_message_queueclear_message_queueClearMessageQueueClearMessageQueueClearMessageQueue. Using an invalid handle results in undefined behavior. Operator clear_message_queueclear_message_queueClearMessageQueueClearMessageQueueClearMessageQueue must not be called while the handle is used concurrently from other threads, because this would result in undefined behavior.

Execution Information

Parameters

QueueHandleQueueHandleQueueHandleQueueHandlequeueHandle (input_control)  message_queue(-array) HMessageQueue, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Message queue handle(s) to be closed.

Number of elements: QueueHandle >= 1

Restriction: QueueHandle != 0

Example (HDevelop)

create_message_queue (ProducerQueue)
create_message_queue (ResultQueue)
* ...

Result

If the message queue handle(s) passed to the operator are valid, clear_message_queueclear_message_queueClearMessageQueueClearMessageQueueClearMessageQueue returns 2 (H_MSG_TRUE). Otherwise an exception is raised. If a tuple of handles is passed and some of them are invalid, clear_message_queueclear_message_queueClearMessageQueueClearMessageQueueClearMessageQueue attempts to clear as many handles from the tuple as possible before reporting the error.

Possible Predecessors

create_message_queuecreate_message_queueCreateMessageQueueCreateMessageQueueCreateMessageQueue, set_message_queue_paramset_message_queue_paramSetMessageQueueParamSetMessageQueueParamSetMessageQueueParam

See also

create_message_queuecreate_message_queueCreateMessageQueueCreateMessageQueueCreateMessageQueue, enqueue_messageenqueue_messageEnqueueMessageEnqueueMessageEnqueueMessage, dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessage, set_message_queue_paramset_message_queue_paramSetMessageQueueParamSetMessageQueueParamSetMessageQueueParam, get_message_queue_paramget_message_queue_paramGetMessageQueueParamGetMessageQueueParamGetMessageQueueParam, create_messagecreate_messageCreateMessageCreateMessageCreateMessage, clear_messageclear_messageClearMessageClearMessageClearMessage, set_message_tupleset_message_tupleSetMessageTupleSetMessageTupleSetMessageTuple, get_message_tupleget_message_tupleGetMessageTupleGetMessageTupleGetMessageTuple, set_message_objset_message_objSetMessageObjSetMessageObjSetMessageObj, get_message_objget_message_objGetMessageObjGetMessageObjGetMessageObj

Module

Foundation