Skip to content

feat: test for send & sync#2

Merged
George-Miao merged 1 commit into
compio-rs:mainfrom
George-Miao:feat/test-send
Jan 5, 2026
Merged

feat: test for send & sync#2
George-Miao merged 1 commit into
compio-rs:mainfrom
George-Miao:feat/test-send

Conversation

@George-Miao
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member

@Berrysoft Berrysoft left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

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 adds compile-time tests for Send and Sync trait bounds on multithreaded synchronization primitives by introducing an AssertMt trait, adds a CONTRIBUTING.md file with contribution guidelines, and removes unused Display trait implementations from atomic types.

Key changes:

  • Introduces AssertMt trait to verify Send + Sync bounds on sync module types
  • Adds explicit unsafe Send/Sync implementations for mutex and bilock internal types
  • Adds project contribution guidelines in CONTRIBUTING.md

Reviewed changes

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

Show a summary per file
File Description
src/lib.rs Defines the AssertMt trait as a compile-time assertion for Send + Sync bounds
src/mutex/mod.rs Adds explicit Send/Sync implementations for mutex types and AssertMt test for Mutex
src/bilock/mod.rs Adds Send/Sync implementations for Inner and AssertMt tests for BiLock, BiLockAcquire, and BiLockGuard
src/mutex_blocking.rs Adds AssertMt test for blocking Mutex wrapper around std::sync::Mutex
src/waker_slot.rs Adds AssertMt test for WakerSlot (futures::task::AtomicWaker)
src/flag.rs Adds AssertMt test for atomic boolean Flag
src/event.rs Adds AssertMt tests for Event and EventListener types
src/atomic/unsync.rs Removes Display trait implementations for AtomicBool and atomic integer types
CONTRIBUTING.md Adds comprehensive contribution guidelines covering development workflow and style guide

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

Comment thread CONTRIBUTING.md
Comment thread CONTRIBUTING.md
Comment thread src/bilock/mod.rs
@George-Miao George-Miao merged commit f068e3e into compio-rs:main Jan 5, 2026
7 checks passed
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.

3 participants