You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asyncband.apache.org by "tisonkun (via GitHub)" <gi...@apache.org> on 2026/10/10 18:07:26 UTC

[PR] refactor(rwlock): remove redundant unsafe trait impls [asyncband]

tisonkun opened a new pull request, #357:
URL: https://github.com/apache/asyncband/pull/357

   ## Summary
   
   Remove five redundant `unsafe impl`s from RwLock guards and let their access-token fields determine the same `Send`/`Sync` bounds. Keep the borrowed read guard's explicit `Send` implementation, which only requires `T: Sync`.
   
   Clarify permit-release responsibility during borrowed token conversion and trim the RwLock modification notes in `LICENSE`, retaining Tokio attribution and the existing license terms.
   
   Validation: `cargo x test` (593 passed), `cargo x check`, and `cargo x lint`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@asyncband.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@asyncband.apache.org
For additional commands, e-mail: commits-help@asyncband.apache.org


Re: [PR] refactor(rwlock): remove redundant unsafe trait impls [asyncband]

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun merged PR #357:
URL: https://github.com/apache/asyncband/pull/357


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@asyncband.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@asyncband.apache.org
For additional commands, e-mail: commits-help@asyncband.apache.org


Re: [PR] refactor(rwlock): remove redundant unsafe trait impls [asyncband]

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #357:
URL: https://github.com/apache/asyncband/pull/357#discussion_r4241016758


##########
asyncband/src/rwlock/owned_write_guard.rs:
##########
@@ -73,9 +73,6 @@ pub struct OwnedRwLockWriteGuard<T: ?Sized> {
     access: WriteAccess<Arc<RwLock<T>>>,
 }
 
-unsafe impl<T: ?Sized + Send + Sync> Send for OwnedRwLockWriteGuard<T> {}
-unsafe impl<T: ?Sized + Send + Sync> Sync for OwnedRwLockWriteGuard<T> {}

Review Comment:
   We have `trait_tests.rs` and `compile_fail_tests` to guard these traits.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@asyncband.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@asyncband.apache.org
For additional commands, e-mail: commits-help@asyncband.apache.org