post_c_object

Function post_c_object 

Source
pub unsafe fn post_c_object(
    port_id: Dart_Port_DL,
    message: *mut Dart_CObject,
) -> bool
Expand description

Posts a message on some port. It will contain a Dart_CObject object graph rooted in the message.

While the message is being sent the state of the graph of Dart_CObject structures rooted in the message should not be accessed, as the message generation will make temporary modifications to the data. When the message has been sent the graph will be fully restored.

If true is returned, the message was enqueued, and finalizers for external typed data will eventually run, even if the receiving isolate shuts down before processing the message. If false is returned, the message was not enqueued and ownership of external typed data in the message remains with the caller.

ยงSafety

initialize_api must be called before this function.