ucx
UAP Common Extensions
Loading...
Searching...
No Matches
Data Fields
cx_buffer_flush_config_s Struct Reference

Configuration for automatic flushing. More...

#include <buffer.h>

Data Fields

size_t threshold
 The buffer may not extend beyond this threshold before starting to flush.
 
size_t blksize
 The block size for the elements to flush.
 
size_t blkmax
 The maximum number of blocks to flush in one cycle.
 
void * target
 The target for write function.
 
cx_write_func wfunc
 The write-function used for flushing.
 

Detailed Description

Configuration for automatic flushing.

Field Documentation

◆ blkmax

size_t cx_buffer_flush_config_s::blkmax

The maximum number of blocks to flush in one cycle.

Attention
while it is guaranteed that cxBufferFlush() will not flush more blocks, this is not necessarily the case for cxBufferWrite(). After performing a flush cycle, cxBufferWrite() will retry the write operation and potentially trigger another flush cycle, until the flush target accepts no more data.

◆ threshold

size_t cx_buffer_flush_config_s::threshold

The buffer may not extend beyond this threshold before starting to flush.

Only used when the buffer uses CX_BUFFER_AUTO_EXTEND. The threshold will be the maximum capacity the buffer is extended to before flushing.

◆ wfunc

cx_write_func cx_buffer_flush_config_s::wfunc

The write-function used for flushing.

If NULL, the flushed content gets discarded.


The documentation for this struct was generated from the following file: