MCPcopy Create free account
hub / github.com/apache/brpc / bthread_once_t

Method bthread_once_t

src/bthread/bthread_once.cpp:21–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include "bthread/butex.h"
20
21bthread_once_t::bthread_once_t()
22 : _butex(bthread::butex_create_checked<butil::atomic<int>>()) {
23 _butex->store(UNINITIALIZED, butil::memory_order_relaxed);
24}
25
26bthread_once_t::~bthread_once_t() {
27 bthread::butex_destroy(_butex);

Callers

nothing calls this directly

Calls 1

storeMethod · 0.45

Tested by

no test coverage detected