Skip to content

feat(driver): make stub & iocp driver non-send and test - #728

Merged
Berrysoft merged 1 commit into
compio-rs:masterfrom
George-Miao:feat/driver/non-send
Mar 3, 2026
Merged

Berrysoft merged 1 commit into
compio-rs:masterfrom
George-Miao:feat/driver/non-send

Conversation

@George-Miao

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings March 3, 2026 16:04
@George-Miao George-Miao self-assigned this Mar 3, 2026
@George-Miao George-Miao added driver: iocp About the IOCP driver package: driver Related to compio-driver driver: stub enhancement New feature or request labels Mar 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 centralizes assert_not_impl! in compio-driver and uses it to enforce that drivers (including stub and IOCP) and the Proactor are !Send/!Sync, with corresponding type-level markers.

Changes:

  • Moved assert_not_impl! macro from compio-runtime into compio-driver and updated call sites.
  • Made stub and IOCP drivers explicitly non-Send/non-Sync via marker fields and compile-time assertions.
  • Added compile-time !Send/!Sync assertions for Proactor and sys::Driver.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
compio-runtime/src/runtime/time.rs Switched TimerFuture !Send/!Sync assertions to the macro exported by compio-driver.
compio-runtime/src/lib.rs Removed the local assert_not_impl! macro definition.
compio-driver/src/sys/stub/mod.rs Added a marker field to prevent the stub Driver from being Send/Sync.
compio-driver/src/sys/mod.rs Added compile-time assertions that Driver is !Send/!Sync.
compio-driver/src/sys/iocp/mod.rs Added a marker field to prevent the IOCP Driver from being Send/Sync.
compio-driver/src/macros.rs Added an exported (hidden) assert_not_impl! macro.
compio-driver/src/lib.rs Added compile-time assertions that Proactor is !Send/!Sync.

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

Comment thread compio-runtime/src/runtime/time.rs Resolved
Comment thread compio-driver/src/sys/stub/mod.rs Resolved
Comment thread compio-driver/src/sys/stub/mod.rs Resolved
Comment thread compio-driver/src/sys/iocp/mod.rs Resolved
Comment thread compio-driver/src/sys/iocp/mod.rs Resolved
@Berrysoft
Berrysoft merged commit 37254e5 into compio-rs:master Mar 3, 2026
67 checks passed
@github-actions github-actions Bot mentioned this pull request Mar 3, 2026
This was referenced Apr 21, 2026
@github-actions github-actions Bot mentioned this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

driver: iocp About the IOCP driver driver: stub enhancement New feature or request package: driver Related to compio-driver

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants