MCPcopy Create free account
hub / github.com/boostorg/asio / fat_executor

Class fat_executor

test/any_io_executor.cpp:41–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41struct fat_executor
42{
43 fat_executor(int id)
44 : id_(id)
45 {
46 std::memset(data_, 0, sizeof(data_));
47 }
48
49 template <typename F>
50 void execute(const F&) const
51 {
52 }
53
54 execution_context& query(execution::context_t) const noexcept
55 {
56 return boost::asio::query(system_executor(), execution::context);
57 }
58
59 constexpr static execution::blocking_t::never_t query(
60 execution::blocking_t) noexcept
61 {
62 return execution::blocking.never;
63 }
64
65 friend bool operator==(const fat_executor& a,
66 const fat_executor& b) noexcept
67 {
68 return a.id_ == b.id_;
69 }
70
71 friend bool operator!=(const fat_executor& a,
72 const fat_executor& b) noexcept
73 {
74 return a.id_ != b.id_;
75 }
76
77 int id_;
78 unsigned char data_[1024];
79};
80
81namespace boost {
82namespace asio {

Calls 1

queryFunction · 0.50

Tested by

no test coverage detected