MySQL 8.4.2
Source Code Documentation
ut0wqueue.cc File Reference

A work queue. More...

#include "ut0wqueue.h"
#include <stddef.h>
#include <sys/types.h>
#include "mem0mem.h"
#include "ut0list.h"

Classes

struct  ib_wqueue_t
 

Functions

ib_wqueue_tib_wqueue_create (void)
 Create a new work queue. More...
 
void ib_wqueue_free (ib_wqueue_t *wq)
 Free a work queue. More...
 
void ib_wqueue_add (ib_wqueue_t *wq, void *item, mem_heap_t *heap)
 Add a work item to the queue. More...
 
uint64_t ib_wqueue_get_count (ib_wqueue_t *wq)
 read total number of work item to the queue. More...
 
void * ib_wqueue_timedwait (ib_wqueue_t *wq, std::chrono::microseconds wait)
 
bool ib_wqueue_is_empty (const ib_wqueue_t *wq)
 

Detailed Description

A work queue.

Created 4/26/2006 Osku Salerma

Function Documentation

◆ ib_wqueue_add()

void ib_wqueue_add ( ib_wqueue_t wq,
void *  item,
mem_heap_t heap 
)

Add a work item to the queue.

Parameters
[in]wqWork queue
[in]itemWork item
[in]heapMemory heap to use for allocating the list node

◆ ib_wqueue_create()

ib_wqueue_t * ib_wqueue_create ( void  )

Create a new work queue.

Returns
work queue

◆ ib_wqueue_free()

void ib_wqueue_free ( ib_wqueue_t wq)

Free a work queue.

in: work queue

Parameters
wqin: work queue

◆ ib_wqueue_get_count()

uint64_t ib_wqueue_get_count ( ib_wqueue_t wq)

read total number of work item to the queue.

Parameters
[in]wqWork queue
Returns
total count of work item in the queue

◆ ib_wqueue_is_empty()

bool ib_wqueue_is_empty ( const ib_wqueue_t wq)

◆ ib_wqueue_timedwait()

void * ib_wqueue_timedwait ( ib_wqueue_t wq,
std::chrono::microseconds  wait 
)