Skip to content

Commit

Permalink
feat(lazy_io): force to enable link_io result
Browse files Browse the repository at this point in the history
  • Loading branch information
Codesire-Deng committed Oct 15, 2023
1 parent 7074c71 commit 5f3bf24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 0 additions & 4 deletions include/co_context/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ namespace config {
using condition_variable_counting_t = std::uintptr_t;
// ========================================================================

// ======================== lazy_io configuration =========================
inline constexpr bool enable_link_io_result = false;
// ========================================================================

// ========================= timer configuration ==========================
/**
* @brief Fix the timer expiring time point, to improve accuracy.
Expand Down
8 changes: 3 additions & 5 deletions lib/co_context/detail/worker_meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,9 @@ void worker_meta::handle_cq_entry(const liburingcxx::cq_entry *const cqe
));
break;
case mux::task_info_ptr__link_sqe:
if constexpr (config::enable_link_io_result) {
io_info->result = result;
}
// if link_io_result is not enabled, we can skip the
// lazy_link_sqe.
// transfer the result of io, but do not resume the task
io_info->result = result;
// io_info->flags = flags;
break;
case mux::msg_ring:
forward_task(std::coroutine_handle<>::from_address(
Expand Down

0 comments on commit 5f3bf24

Please sign in to comment.