Data Structures | Typedefs | Functions
multiqueue.c File Reference
#include <assert.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <uv.h>
#include "nvim/event/multiqueue.h"
#include "nvim/memory.h"
#include "nvim/os/time.h"

Data Structures

struct  multiqueue_item
struct  multiqueue
struct  MulticastEvent


typedef struct multiqueue_item MultiQueueItem


MultiQueuemultiqueue_new_parent (PutCallback put_cb, void *data)
MultiQueuemultiqueue_new_child (MultiQueue *parent) FUNC_ATTR_NONNULL_ALL
void multiqueue_free (MultiQueue *this)
Event multiqueue_get (MultiQueue *this)
 Removes the next item and returns its Event. More...
void multiqueue_put_event (MultiQueue *this, Event event)
void multiqueue_process_events (MultiQueue *this)
void multiqueue_purge_events (MultiQueue *this)
 Removes all events without processing them. More...
bool multiqueue_empty (MultiQueue *this)
void multiqueue_replace_parent (MultiQueue *this, MultiQueue *new_parent)
size_t multiqueue_size (MultiQueue *this)
 Gets the count of all events currently in the queue. More...
Event event_create_oneshot (Event ev, int num)

Typedef Documentation

◆ MultiQueueItem

Function Documentation

◆ event_create_oneshot()

Event event_create_oneshot ( Event  ev,
int  num 

Multicasts a one-shot event to multiple queues.

The handler will be invoked once by the first queue that consumes the event. Later processing will do nothing (just memory cleanup).

numNumber of queues that the event will be put on
Event that is safe to put onto num queues

◆ multiqueue_empty()

bool multiqueue_empty ( MultiQueue this)

◆ multiqueue_free()

void multiqueue_free ( MultiQueue this)

◆ multiqueue_get()

Event multiqueue_get ( MultiQueue this)

Removes the next item and returns its Event.

◆ multiqueue_new_child()

MultiQueue* multiqueue_new_child ( MultiQueue parent)

◆ multiqueue_new_parent()

MultiQueue* multiqueue_new_parent ( PutCallback  put_cb,
void data 

◆ multiqueue_process_events()

void multiqueue_process_events ( MultiQueue this)

◆ multiqueue_purge_events()

void multiqueue_purge_events ( MultiQueue this)

Removes all events without processing them.

◆ multiqueue_put_event()

void multiqueue_put_event ( MultiQueue this,
Event  event 

◆ multiqueue_replace_parent()

void multiqueue_replace_parent ( MultiQueue this,
MultiQueue new_parent 

◆ multiqueue_size()

size_t multiqueue_size ( MultiQueue this)

Gets the count of all events currently in the queue.