Add manual Sync impl for ReentrantLockGuard

Fixes: #125526
This commit is contained in:
Jacob Lifshay
2024-05-24 16:17:19 -07:00
parent 36153f1a4e
commit f4b9ac68f3
3 changed files with 38 additions and 0 deletions

View File

@@ -116,6 +116,9 @@ pub struct ReentrantLockGuard<'a, T: ?Sized + 'a> {
#[unstable(feature = "reentrant_lock", issue = "121440")]
impl<T: ?Sized> !Send for ReentrantLockGuard<'_, T> {}
#[unstable(feature = "reentrant_lock", issue = "121440")]
unsafe impl<T: ?Sized + Sync> Sync for ReentrantLockGuard<'_, T> {}
#[unstable(feature = "reentrant_lock", issue = "121440")]
impl<T> ReentrantLock<T> {
/// Creates a new re-entrant lock in an unlocked state ready for use.