MCPcopy Create free account
hub / github.com/boost-ext/sml / create_lock

Method create_lock

include/boost/sml.hpp:1874–1881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1872struct thread_safe : aux::pair<thread_safety_policy__, thread_safe<TLock>> {
1873 using type = thread_safe;
1874 constexpr auto create_lock() {
1875 struct lock_guard {
1876 TLock &lock_;
1877 constexpr explicit lock_guard(TLock &lock) : lock_{lock} { lock_.lock(); }
1878 ~lock_guard() { lock_.unlock(); }
1879 };
1880 return lock_guard{lock};
1881 }
1882 TLock lock{};
1883};
1884} // namespace policies

Callers 2

process_eventMethod · 0.45
flush_queueMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected