V8 Project
v8::base::SingleThreadInitOnceTrait Struct Reference

#include <lazy-instance.h>

+ Collaboration diagram for v8::base::SingleThreadInitOnceTrait:

Static Public Member Functions

template<typename Function , typename Storage >
static void Init (OnceType *once, Function function, Storage storage)
 

Detailed Description

Definition at line 154 of file lazy-instance.h.

Member Function Documentation

◆ Init()

template<typename Function , typename Storage >
static void v8::base::SingleThreadInitOnceTrait::Init ( OnceType once,
Function  function,
Storage  storage 
)
inlinestatic

Definition at line 156 of file lazy-instance.h.

156  {
157  if (*once == ONCE_STATE_UNINITIALIZED) {
158  function(storage);
159  *once = ONCE_STATE_DONE;
160  }
161  }
@ ONCE_STATE_UNINITIALIZED
Definition: once.h:67
@ ONCE_STATE_DONE
Definition: once.h:69

References v8::base::ONCE_STATE_DONE, and v8::base::ONCE_STATE_UNINITIALIZED.


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