MySQL 8.0.40
Source Code Documentation
ut0wqueue.h File Reference

A work queue. More...

#include "mem0mem.h"
#include "sync0sync.h"
#include "ut0list.h"

Go to the source code of this file.

Functions

ib_wqueue_tib_wqueue_create ()
 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...
 
bool ib_wqueue_is_empty (const ib_wqueue_t *wq)
 
void * ib_wqueue_timedwait (ib_wqueue_t *wq, std::chrono::microseconds wait)
 

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 
)