YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
ref.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace yaclib {
4
5/**
6 * Reference counting interface
7 */
8class IRef {
9 public:
10 /**
11 * Increments reference counter
12 */
13 virtual void IncRef() noexcept {
14 }
15
16 /**
17 * Decrements reference counter
18 */
19 virtual void DecRef() noexcept {
20 }
21
22 virtual ~IRef() noexcept = default;
23};
24
25} // namespace yaclib
Reference counting interface.
Definition ref.hpp:8
virtual ~IRef() noexcept=default
virtual void IncRef() noexcept
Increments reference counter.
Definition ref.hpp:13
virtual void DecRef() noexcept
Decrements reference counter.
Definition ref.hpp:19
Contract< V, E > MakeContract()
Creates related future and promise.
Definition contract.hpp:25