YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
mutex.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <mutex>
6
7namespace yaclib::detail::fiber {
8
9class Mutex {
10 public:
11 Mutex() = default;
13
16
17 void lock();
18 bool try_lock() noexcept;
19 void unlock() noexcept;
20
22
24
27 bool _occupied{false};
28};
29
30} // namespace yaclib::detail::fiber
native_handle_type native_handle()
Definition mutex.cpp:25
void unlock() noexcept
Definition mutex.cpp:20
bool try_lock() noexcept
Definition mutex.cpp:12
~Mutex() noexcept=default
Contract< V, E > MakeContract()
Creates related future and promise.
Definition contract.hpp:25