async_work_on_timeout Struct Reference

A "timeout" instance used by an async_context. More...

#include <async_context.h>

Collaboration diagram for async_work_on_timeout:

Data Fields

struct async_work_on_timeoutnext
 
void(* do_work )(async_context_t *context, struct async_work_on_timeout *timeout)
 
absolute_time_t next_time
 
void * user_data
 

Detailed Description

A "timeout" instance used by an async_context.

A "timeout" represents some future action that must be taken at a specific time. Its methods are called from the async_context under lock at the given time

See also
async_context_add_worker_at
async_context_add_worker_in_ms

Field Documentation

◆ do_work

void(* async_work_on_timeout::do_work) (async_context_t *context, struct async_work_on_timeout *timeout)

Method called when the timeout is reached; may not be NULL

Note, that when this method is called, the timeout has been removed from the async_context, so if you want the timeout to repeat, you should re-add it during this callback

Parameters
context
timeout

◆ next

struct async_work_on_timeout* async_work_on_timeout::next

private link list pointer

◆ next_time

absolute_time_t async_work_on_timeout::next_time

The next timeout time; this should only be modified during the above methods or via async_context methods

◆ user_data

void* async_work_on_timeout::user_data

User data associated with the timeout instance


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