libfilezilla
|
A buffer pool for use with async readers/writers. More...
#include <aio.hpp>
Public Types | |
typedef void * | shm_handle |
Public Member Functions | |
aio_buffer_pool (logger_interface &logger, size_t buffer_count=1, size_t buffer_size=0, bool use_shm=false, std::string_view application_group_id={}) | |
operator bool () const | |
buffer_lease | get_buffer (aio_waiter &h) |
buffer_lease | get_buffer (event_handler &h) |
logger_interface & | logger () const |
std::tuple< shm_handle, uint8_t const *, size_t > | shared_memory_info () const |
size_t | buffer_count () const |
Public Member Functions inherited from aio_waitable | |
void | remove_waiter (aio_waiter &h) |
void | remove_waiter (event_handler &h) |
Static Public Attributes | |
static shm_handle const | shm_handle_default |
Friends | |
class | buffer_lease |
Additional Inherited Members | |
Protected Member Functions inherited from aio_waitable | |
void | remove_waiters () |
Call in destructor of most-derived class. | |
void | add_waiter (aio_waiter &h) |
void | add_waiter (event_handler &h) |
void | signal_availibility () |
A buffer pool for use with async readers/writers.
Can use shared memory, see shared_memory_info()
buffer_lease get_buffer | ( | aio_waiter & | h | ) |
/brief Returns either a buffer lease, or records the passed waiter/handler as waiting.
If waiting, do not call get_buffer again until after waiter/handler got signalled.
If a buffer becomes available and there are multiple waiters, the order in waiters are signaled is undefined.
std::tuple<shm_handle, uint8_t const*, size_t> shared_memory_info | ( | ) | const |
Returns a tuple with information on the mapping
To pass buffer leases to a child process: