Skip to content

Commit

Permalink
Merge pull request #108 from redboltz/improve_strand
Browse files Browse the repository at this point in the history
Improved strand type.
  • Loading branch information
redboltz authored Dec 29, 2023
2 parents c7a5326 + d6b298c commit 984e81f
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 82 deletions.
12 changes: 10 additions & 2 deletions include/async_mqtt/broker/endpoint_variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,30 @@ class epsp_wrap {
);
}

#if 0
decltype(auto) strand() const {
return visit(
[&](auto& ep) -> decltype(auto) {
return ep.strand();
}
);
}

decltype(auto) strand() {
return visit(
[&](auto& ep) -> decltype(auto) {
return ep.strand();
}
);
}
#endif

bool in_strand() const {
return visit(
[&](auto& ep) {
return ep.in_strand();
}
);
}

// async functions

template <typename CompletionToken>
Expand Down
Loading

0 comments on commit 984e81f

Please sign in to comment.