MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / lazy_init

Function lazy_init

extern/boost/boost/thread/future.hpp:2273–2284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2271 bool future_obtained;
2272
2273 void lazy_init()
2274 {
2275#if defined BOOST_THREAD_PROVIDES_PROMISE_LAZY
2276#include <boost/thread/detail/atomic_undef_macros.hpp>
2277 if(!atomic_load(&future_))
2278 {
2279 future_ptr blank;
2280 atomic_compare_exchange(&future_,&blank,future_ptr(new detail::shared_state<R>));
2281 }
2282#include <boost/thread/detail/atomic_redef_macros.hpp>
2283#endif
2284 }
2285
2286 public:
2287 BOOST_THREAD_MOVABLE_ONLY(promise)

Callers 8

set_executorFunction · 0.85
get_futureFunction · 0.85
set_valueFunction · 0.85
set_value_deferredFunction · 0.85
emplaceFunction · 0.85
set_exceptionFunction · 0.85
set_exception_deferredFunction · 0.85
set_wait_callbackFunction · 0.85

Calls 2

atomic_compare_exchangeFunction · 0.85
atomic_loadFunction · 0.50

Tested by

no test coverage detected