YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
execution_context.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <yaclib/config.hpp>
5
6#include <ucontext.h>
7
8#ifdef YACLIB_ASAN
9# include <sanitizer/asan_interface.h>
10#endif
11
12namespace yaclib::detail::fiber {
13
14using Trampoline = void (*)(void* arg);
15
17 public:
19
20 void Start();
21
23
25
26 private:
27 ucontext_t _context;
28};
29
30} // namespace yaclib::detail::fiber
void SwitchTo(ExecutionContext &other)
void Setup(Allocation stack, Trampoline trampoline, void *arg)
void(*)(void *arg) Trampoline
Contract< V, E > MakeContract()
Creates related future and promise.
Definition contract.hpp:25