Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillan committed Nov 14, 2023
1 parent edbf854 commit d53fc7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions worker/src/DepLibUring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,15 @@ DepLibUring::DepLibUring()
{
MS_TRACE();

// Initialize io_uring.
auto error = io_uring_queue_init(DepLibUring::QueueDepth, std::addressof(this->ring), 0);

if (error < 0)
{
MS_THROW_ERROR("io_uring_queue_init() failed: %s", std::strerror(-error));
}

/* Create an eventfd instance */
// Create an eventfd instance.
this->efd = eventfd(0, 0);

if (this->efd < 0)
Expand All @@ -103,7 +104,7 @@ DepLibUring::DepLibUring()
MS_THROW_ERROR("io_uring_register_eventfd() failed: %s", std::strerror(-error));
}

// Watch the event file descriptor.
// Watch the event file descriptor for completions.
this->uvHandle = new uv_poll_t;

error = uv_poll_init(DepLibUV::GetLoop(), this->uvHandle, this->efd);
Expand Down

0 comments on commit d53fc7a

Please sign in to comment.