ck_epoch_reclaim3
Immediately execute all deferred callbacks
Usage
#include <ck_epoch.h>
void
ck_epoch_reclaim(ck_epoch_record_t *record);
Library
Concurrency Kit (libck, -lck)
Overview
The ck_epoch_reclaim(3) function will unconditionally execute all callbacks that have been deferred with ck_epoch_call(3).
Examples
#include <ck_epoch.h>
#include <ck_stack.h>
#include <stdlib.h>
/*
* epoch was previously initialized with ck_epoch_init.
*/
ck_epoch_t *epoch;
void
function(void)
{
ck_epoch_record_t *record;
logically_delete(object);
ck_epoch_call(epoch, record, &object->epoch_entry, destructor);
/*
* Wait until no threads could possibly have a reference to the
* object we just deleted.
*/
ck_epoch_synchronize(epoch, record);
/*
* Execute all deferred callbacks.
*/
ck_epoch_reclaim(record);
return;
}
Return values
This function has no return value.
Releases
Unchanged in 5 releases since Debian 8 (Jessie).