#include "objfw-defs.h"
#import "macros.h"
Go to the source code of this file.
|
| void | OFOnce (OFOnceControl *control, OFOnceFunction function) |
| | Executes the specified function exactly once in the application's lifetime, even in a multi-threaded environment.
|
| |
◆ OFOnce()
| void OFOnce |
( |
OFOnceControl * |
control, |
|
|
OFOnceFunction |
function |
|
) |
| |
Executes the specified function exactly once in the application's lifetime, even in a multi-threaded environment.
- Parameters
-
| control | An OFOnceControl. This should be a static variable preinitialized to OFOnceControlInitValue. |
| function | The function to execute once |