Operator Reference

clear_messageT_clear_messageClearMessageClearMessageclear_message (Operator)

clear_messageT_clear_messageClearMessageClearMessageclear_message — Close a message handle and release all associated resources.

Signature

clear_message( : : MessageHandle : )

Herror T_clear_message(const Htuple MessageHandle)

void ClearMessage(const HTuple& MessageHandle)

static void HMessage::ClearMessage(const HMessageArray& MessageHandle)

void HMessage::ClearMessage() const

static void HOperatorSet.ClearMessage(HTuple messageHandle)

static void HMessage.ClearMessage(HMessage[] messageHandle)

void HMessage.ClearMessage()

def clear_message(message_handle: MaybeSequence[HHandle]) -> None

Description

clear_messageclear_messageClearMessageClearMessageclear_message closes a message handle MessageHandleMessageHandleMessageHandlemessageHandlemessage_handle that was previously opened with create_messagecreate_messageCreateMessageCreateMessagecreate_message or dequeue_messagedequeue_messageDequeueMessageDequeueMessagedequeue_message. Any resources owned by the message, in particular the tuple or object data stored in the message, will be released.

Multiple message handles can be closed in a single clear_messageclear_messageClearMessageClearMessageclear_message call, passing them as a tuple to the MessageHandleMessageHandleMessageHandlemessageHandlemessage_handle parameter.

Attention

The handle(s) must not be used again after being invalidated using clear_messageclear_messageClearMessageClearMessageclear_message. Using an invalid handle results 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

MessageHandleMessageHandleMessageHandlemessageHandlemessage_handle (input_control, state is modified)  message(-array) HMessage, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Message handle(s) to be closed.

Number of elements: MessageHandle >= 1

Restriction: MessageHandle != 0

Example (HDevelop)

MessageHandles := []
for idx := 0 to 4 by 1
  create_message (MessageHandle)
  MessageHandles[idx]:= MessageHandle
endfor
* ...

Result

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

Possible Predecessors

create_messagecreate_messageCreateMessageCreateMessagecreate_message, dequeue_messagedequeue_messageDequeueMessageDequeueMessagedequeue_message

See also

create_messagecreate_messageCreateMessageCreateMessagecreate_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, set_message_paramset_message_paramSetMessageParamSetMessageParamset_message_param, get_message_paramget_message_paramGetMessageParamGetMessageParamget_message_param, enqueue_messageenqueue_messageEnqueueMessageEnqueueMessageenqueue_message, dequeue_messagedequeue_messageDequeueMessageDequeueMessagedequeue_message

Module

Foundation