Skip to content

refactor Ring class#110

Merged
wokron merged 11 commits into
masterfrom
refactor-ring
May 11, 2026
Merged

refactor Ring class#110
wokron merged 11 commits into
masterfrom
refactor-ring

Conversation

@wokron
Copy link
Copy Markdown
Member

@wokron wokron commented May 11, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors condy::Ring toward RAII construction (constructor initializes; destructor exits) and moves ring-adjacent helpers (FdTable, BufferTable, RingSettings) out of Ring/into runtime-owned components, updating tests to the new APIs.

Changes:

  • Replace Ring::init() / Ring::destroy() usage with Ring(entries, params) construction across tests.
  • Make Runtime own FdTable, BufferTable, and RingSettings instead of delegating through Ring.
  • Extract FdTable/BufferTable/RingSettings into a new include/condy/ring_settings.hpp header.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_ring.cpp Update tests to construct Ring directly (no init/destroy calls).
tests/test_op_finish_handle.cpp Update ring creation to new constructor-based API.
tests/test_fd_table.cpp Switch table access from Context::ring() to Context::runtime().
tests/test_buffers.cpp Update ring creation to new constructor-based API.
tests/test_buffer_table.cpp Switch table access to runtime-owned tables; update clone test setup.
include/condy/runtime.hpp Refactor runtime ring construction; move tables/settings to runtime members; adjust thread-local ring creation.
include/condy/ring.hpp Remove init/destroy pattern; add throwing constructor + RAII teardown; update SQPOLL checks.
include/condy/ring_settings.hpp New header containing FdTable, BufferTable, and RingSettings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread include/condy/runtime.hpp
Comment thread include/condy/ring.hpp
Comment thread include/condy/runtime.hpp
@wokron wokron marked this pull request as ready for review May 11, 2026 12:09
@wokron wokron merged commit 44508b3 into master May 11, 2026
13 checks passed
@wokron wokron deleted the refactor-ring branch May 11, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants