Operator Reference

clear_message_queueT_clear_message_queueClearMessageQueueClearMessageQueueclear_message_queue (Operator)

clear_message_queueT_clear_message_queueClearMessageQueueClearMessageQueueclear_message_queue — 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()

def clear_message_queue(queue_handle: MaybeSequence[HHandle]) -> None

Description

clear_message_queueclear_message_queueClearMessageQueueClearMessageQueueclear_message_queue closes a message queue handle QueueHandleQueueHandleQueueHandlequeueHandlequeue_handle that was previously opened with create_message_queuecreate_message_queueCreateMessageQueueCreateMessageQueuecreate_message_queue. 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_queueClearMessageQueueClearMessageQueueclear_message_queue call, passing them as a tuple to the QueueHandleQueueHandleQueueHandlequeueHandlequeue_handle parameter.

Attention

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

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters

QueueHandleQueueHandleQueueHandlequeueHandlequeue_handle (input_control, state is modified)  message_queue(-array) HMessageQueue, HTupleMaybeSequence[HHandle]HTupleHtuple (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_queueClearMessageQueueClearMessageQueueclear_message_queue 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_queueClearMessageQueueClearMessageQueueclear_message_queue attempts to clear as many handles from the tuple as possible before reporting the error.

Possible Predecessors

create_message_queuecreate_message_queueCreateMessageQueueCreateMessageQueuecreate_message_queue, set_message_queue_paramset_message_queue_paramSetMessageQueueParamSetMessageQueueParamset_message_queue_param

See also

create_message_queuecreate_message_queueCreateMessageQueueCreateMessageQueuecreate_message_queue, enqueue_messageenqueue_messageEnqueueMessageEnqueueMessageenqueue_message, dequeue_messagedequeue_messageDequeueMessageDequeueMessagedequeue_message, set_message_queue_paramset_message_queue_paramSetMessageQueueParamSetMessageQueueParamset_message_queue_param, get_message_queue_paramget_message_queue_paramGetMessageQueueParamGetMessageQueueParamget_message_queue_param, create_messagecreate_messageCreateMessageCreateMessagecreate_message, clear_messageclear_messageClearMessageClearMessageclear_message, set_message_tupleset_message_tupleSetMessageTupleSetMessageTupleset_message_tuple, get_message_tupleget_message_tupleGetMessageTupleGetMessageTupleget_message_tuple, set_message_objset_message_objSetMessageObjSetMessageObjset_message_obj, get_message_objget_message_objGetMessageObjGetMessageObjget_message_obj

Module

Foundation