MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
delivery.h File Reference

Go to the source code of this file.

Data Structures

struct  mln_delivery_queue_options

Typedefs

typedef struct mln_delivery_queue_options mln_delivery_queue_options

Functions

mln_status mln_delivery_queue_create (const mln_delivery_queue_options *options, mln_delivery_queue *out_queue, mln_diagnostic *out_diagnostic)
void mln_delivery_queue_release (mln_delivery_queue queue)
mln_status mln_delivery_queue_dispatch (mln_delivery_queue queue, mln_diagnostic *out_diagnostic)

Detailed Description

Run callbacks on a thread that the caller chooses.

Typedef Documentation

◆ mln_delivery_queue_options

typedef struct mln_delivery_queue_options mln_delivery_queue_options

Function Documentation

◆ mln_delivery_queue_create()

mln_status mln_delivery_queue_create ( const mln_delivery_queue_options * options,
mln_delivery_queue * out_queue,
mln_diagnostic * out_diagnostic )

Creates a queue that holds callback calls until mln_delivery_queue_dispatch() runs them.

◆ mln_delivery_queue_dispatch()

mln_status mln_delivery_queue_dispatch ( mln_delivery_queue queue,
mln_diagnostic * out_diagnostic )

Runs the calls in the queue on the calling thread.

When the queue is empty, it succeeds and runs nothing.

Returns:

  • MLN_STATUS_BUSY when another dispatch of the queue is running. That dispatch runs the calls instead.

◆ mln_delivery_queue_release()

void mln_delivery_queue_release ( mln_delivery_queue queue)

Releases a queue.

The calls in the queue, and any that registrations would add later, never run.