#include "base.h"
Go to the source code of this file.
Typedefs | |
typedef intptr_t | dispatch_once_t |
A predicate for use with dispatch_once(). | |
Functions | |
DISPATCH_NONNULL_ALL DISPATCH_NOTHROW void | dispatch_once (dispatch_once_t *predicate, dispatch_block_t block) |
dispatch_once | |
DISPATCH_NONNULL1 DISPATCH_NONNULL3 DISPATCH_NOTHROW void | dispatch_once_f (dispatch_once_t *predicate, void *context, void(*function)(void *)) |
A predicate for use with dispatch_once().
It must be initialized to zero. Note: static and global variables default to zero.
DISPATCH_NONNULL_ALL DISPATCH_NOTHROW void dispatch_once | ( | dispatch_once_t * | predicate, |
dispatch_block_t | block | ||
) |
dispatch_once
Execute a block once and only once.
predicate | A pointer to a dispatch_once_t that is used to test whether the block has completed or not. |
block | The block to execute once. |
Always call dispatch_once() before using or testing any variables that are initialized by the block.
DISPATCH_NONNULL1 DISPATCH_NONNULL3 DISPATCH_NOTHROW void dispatch_once_f | ( | dispatch_once_t * | predicate, |
void * | context, | ||
void(*)(void *) | function | ||
) |