MCPcopy Create free account
hub / github.com/David-Haim/concurrencpp / operator()

Method operator()

source/task.cpp:98–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98void task::operator()() {
99 const auto vtable = std::exchange(m_vtable, nullptr);
100 if (vtable == nullptr) {
101 return;
102 }
103
104 if (contains<coroutine_handle_functor>(vtable)) {
105 return callable_vtable<coroutine_handle_functor>::execute_destroy(m_buffer);
106 }
107
108 if (contains<await_via_functor>(vtable)) {
109 return callable_vtable<await_via_functor>::execute_destroy(m_buffer);
110 }
111
112 vtable->execute_destroy_fn(m_buffer);
113}
114
115task& task::operator=(task&& rhs) noexcept {
116 if (this == &rhs) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected