commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
4d6581e04967cf181548f738338e89985446d65c
Amanieu d'Antras
2017-12-04T22:13:30
Bump parking_lot_core version to 0.2.7
diff --git a/core/Cargo.toml b/core/Cargo.toml index 7bf8925..1616ffc 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot_core" -version = "0.2.6" +version = "0.2.7" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "An advanced API for creating custom syn...
1
1
1
0f0f6ab58281471be348769ebd37b5d19451764a
Łukasz Neumann
2017-12-03T14:59:32
Removed unnecessary feature gates
diff --git a/src/lib.rs b/src/lib.rs index 32df19e..81f2e0f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,13 +11,6 @@ #![warn(missing_docs)] #![cfg_attr(feature = "nightly", feature(const_fn))] -#![cfg_attr(feature = "nightly", feature(const_atomic_u8_new))] -#![cfg_attr(feature = "nightly", feature(const_atomic_...
1
0
7
894fc852bc44dec0d66bd83c8402d1d9fb6b8e5a
Matt Brubeck
2017-12-01T17:03:51
Update to smallvec 0.6
diff --git a/core/Cargo.toml b/core/Cargo.toml index 5f10c9e..7bf8925 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/Amanieu/parking_lot" keywords = ["mutex", "condvar", "rwlock", "once", "thread"] [dependencies] -smallvec = "0.4" +smallvec = "0.6" rand = "0.3" ...
1
1
1
1ed621e99dd27b44ffe34b304e7d5548ec415907
Amanieu d'Antras
2017-11-28T00:04:14
Bump parking_lot version to 0.5.3
diff --git a/Cargo.toml b/Cargo.toml index b50230f..d2f93e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.5.2" +version = "0.5.3" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
7319918abe7dde79e113d709cdbd359efe314fea
R. Andrew Ohana
2017-11-27T23:42:13
add missing re-export and typedef for UpgradableGuard
diff --git a/src/lib.rs b/src/lib.rs index 0321db6..70fb6d8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -49,7 +49,7 @@ pub use once::{Once, ONCE_INIT, OnceState}; pub use mutex::{Mutex, MutexGuard}; pub use remutex::{ReentrantMutex, ReentrantMutexGuard}; pub use condvar::{Condvar, WaitTimeoutResult}; -pub use rwlock...
1
5
1
efd045412780f478202e775041d837b3f2186d1d
Amanieu d'Antras
2017-11-27T18:19:00
Bump parking_lot version to 0.5.2
diff --git a/Cargo.toml b/Cargo.toml index b264352..b50230f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.5.1" +version = "0.5.2" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
d8c91330157839b9f48905e0775bd8df6dcbdc73
R. Andrew Ohana
2017-11-26T17:35:14
use a strong exchange since there is no fallback
diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index efe24bd..652c1a6 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -415,7 +415,7 @@ impl RawRwLock { #[inline] pub fn try_upgradable_to_exclusive(&self) -> bool { self.state - .compare_exchange_weak( + .compare_exc...
1
1
1
64315fbb72cf389d27f16978d70c7d3508a20d52
R. Andrew Ohana
2017-11-26T17:33:33
shorten fast path for unlocking shared guard
diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index 63dedcb..efe24bd 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -244,8 +244,7 @@ impl RawRwLock { unsafe { deadlock::release_resource(self as *const _ as usize) }; let state = self.state.load(Ordering::Relaxed); if state & PA...
1
1
2
e9917d62ce5cabcdfed7fd874ead71988a36d0e9
R. Andrew Ohana
2017-11-26T17:33:13
relax a few atomic operations
diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index 9383f93..63dedcb 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -354,7 +354,7 @@ impl RawRwLock { pub fn upgradable_to_shared(&self) { let state = self.state.fetch_sub( UPGRADABLE_GUARD - SHARED_GUARD, - Ordering::...
1
5
5
6fc0b2e0fbb33ad94829f2b0b876f6e098486842
R. Andrew Ohana
2017-11-26T17:32:37
fix a few small comment typos
diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index 20eaa73..9383f93 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -166,7 +166,7 @@ impl RawRwLock { fn try_lock_shared_fast(&self, recursive: bool) -> bool { let state = self.state.load(Ordering::Relaxed); - // We can't allow grabb...
1
2
2
e524ec57786227847583846543f7f78215f8f85e
R. Andrew Ohana
2017-11-26T17:31:47
add small comment explaining `UPGRADABLE_GUARD`'s value
diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index 243c1f9..20eaa73 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -38,6 +38,9 @@ const GUARD_COUNT_MASK: usize = USABLE_BITS_MASK & !(SHARED_GUARD - 1); // An exclusive lock acquires all of guard resource (i.e. it is exclusive) const EXCLUSIVE_GUARD: u...
1
3
0
74c938b665e76b18f1650b3025fa13e86b9f6b7a
R. Andrew Ohana
2017-11-19T22:41:37
Remove the need for a LOCKED_BIT in RwLock
diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index a064840..9d84950 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -21,11 +21,13 @@ use deadlock; const TOKEN_SHARED: ParkToken = ParkToken(0); const TOKEN_EXCLUSIVE: ParkToken = ParkToken(1); -const PARKED_BIT: usize = 1; -const LOCKED_BIT: usize = 2...
1
88
91
6208e8a9fe7f07dc311c9f4b81bf2a1b4706aaad
Amanieu d'Antras
2017-11-16T19:25:04
Bump parking_lot version to 0.5.1
diff --git a/Cargo.toml b/Cargo.toml index f198454..7781970 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.5.0" +version = "0.5.1" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
37c0027ce203c1b02bbba3825964e198c2a06983
Amanieu d'Antras
2017-11-16T19:24:32
Implement Debug for Once Fixes #47
diff --git a/src/once.rs b/src/once.rs index e1bb356..2b75e73 100644 --- a/src/once.rs +++ b/src/once.rs @@ -14,6 +14,7 @@ use stable::{AtomicU8, ATOMIC_U8_INIT, Ordering, fence}; #[cfg(not(feature = "nightly"))] type U8 = usize; use std::mem; +use std::fmt; use parking_lot_core::{self, SpinWait, DEFAULT_PARK_TOKEN...
1
7
0
1e11d164d0996ec4cd9c6db8c2965841acb9a81c
Amanieu d'Antras
2017-11-14T12:19:47
Add map() to ReentrantMutexGuard
diff --git a/src/remutex.rs b/src/remutex.rs index 816eec6..a47d1c5 100644 --- a/src/remutex.rs +++ b/src/remutex.rs @@ -43,13 +43,12 @@ unsafe impl<T: Send> Sync for ReentrantMutex<T> {} /// `Deref` implementation. #[must_use] pub struct ReentrantMutexGuard<'a, T: ?Sized + 'a> { - mutex: &'a ReentrantMutex<T>, -...
1
42
18
f46c7b9fd0c13c72a0128682ccf8e7e92fa7f6a9
John Kåre Alsaker
2017-11-14T09:21:14
mem::forget the old lock guard
diff --git a/src/mutex.rs b/src/mutex.rs index 2abbb2c..5c54817 100644 --- a/src/mutex.rs +++ b/src/mutex.rs @@ -144,6 +144,7 @@ impl<T> Mutex<T> { } impl<T: ?Sized> Mutex<T> { + #[inline] fn guard(&self) -> MutexGuard<T> { MutexGuard { raw: &self.raw, @@ -314,10 +315,13 @@ impl<'a, T:...
2
21
9
39a4f930c0a14addbc3608b19c952f8631e37e64
John Kåre Alsaker
2017-11-13T07:41:22
Add map methods to lock guards
diff --git a/src/mutex.rs b/src/mutex.rs index 10fef8e..2abbb2c 100644 --- a/src/mutex.rs +++ b/src/mutex.rs @@ -110,8 +110,9 @@ unsafe impl<T: Send> Sync for Mutex<T> {} /// `Deref` and `DerefMut` implementations. #[must_use] pub struct MutexGuard<'a, T: ?Sized + 'a> { - mutex: &'a Mutex<T>, - marker: Phantom...
2
125
85
36e616f70c75d098c83e6ddb1f96c5dc3aacbb35
Amanieu d'Antras
2017-09-19T13:25:14
Add Cargo workspace
diff --git a/Cargo.toml b/Cargo.toml index 8497efb..fbb5f8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,3 +20,5 @@ rand = "0.3" default = ["owning_ref"] nightly = ["parking_lot_core/nightly"] deadlock_detection = ["parking_lot_core/deadlock_detection"] + +[workspace]
1
2
0
52bf75b494060b5b35644155d7dd70c5a7d65fea
Sergio Benitez
2017-09-17T02:02:58
Bump parking_lot version to 0.4.8
diff --git a/Cargo.toml b/Cargo.toml index 67664cc..8497efb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.4.7" +version = "0.4.8" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
16c6ff3c3de9683732fea5f0730ea220f12e2f57
Sergio Benitez
2017-09-17T02:02:19
Update for '2017-09-16' nightly
diff --git a/src/lib.rs b/src/lib.rs index c0dbbdd..e361a8d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,6 +11,12 @@ #![warn(missing_docs)] #![cfg_attr(feature = "nightly", feature(const_fn))] +#![cfg_attr(feature = "nightly", feature(const_atomic_u8_new))] +#![cfg_attr(feature = "nightly", feature(const_atomic_...
1
6
0
16a1cda222e2605173d5d5c339a860fac4a04405
Amanieu d'Antras
2017-09-09T08:48:21
Bump parking_lot version to 0.4.7
diff --git a/Cargo.toml b/Cargo.toml index 279c563..67664cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.4.6" +version = "0.4.7" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
e295dd348dd456d5a4343b32591443c88d83b66f
Amanieu d'Antras
2017-09-09T08:48:04
Bump parking_lot_core version to 0.2.6
diff --git a/core/Cargo.toml b/core/Cargo.toml index 3b114e4..5f10c9e 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot_core" -version = "0.2.5" +version = "0.2.6" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "An advanced API for creating custom syn...
1
1
1
eefacc0faccd468f19f62243a3b63c23c252cdd4
arthurprs
2017-09-09T07:13:17
Make check_deadlock safe
diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs index d3a0862..09b5e35 100644 --- a/core/src/parking_lot.rs +++ b/core/src/parking_lot.rs @@ -1093,26 +1093,28 @@ pub mod deadlock { } /// Acquire a resource identified by key in the deadlock detector - /// Noop if deadlock_detection feature ...
2
22
21
55bb44708f991bc080020536c30852ac9dc63851
Amanieu d'Antras
2017-09-08T15:27:11
Bump parking_lot version to 0.4.6
diff --git a/Cargo.toml b/Cargo.toml index 915b5a3..279c563 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.4.5" +version = "0.4.6" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
9d5285314605680c1853b8bcb4c740222ed8dd72
Amanieu d'Antras
2017-09-08T15:26:51
Bump parking_lot_core version to 0.2.5
diff --git a/core/Cargo.toml b/core/Cargo.toml index f4988e2..3b114e4 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot_core" -version = "0.2.4" +version = "0.2.5" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "An advanced API for creating custom syn...
1
1
1
7cbefc45fa4339ff0f3186b66354084d11d1fb06
Amanieu d'Antras
2017-08-21T14:06:57
Bump parking_lot_core version to 0.2.4
diff --git a/core/Cargo.toml b/core/Cargo.toml index 5d7fe22..de99217 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot_core" -version = "0.2.3" +version = "0.2.4" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "An advanced API for creating custom syn...
1
1
1
52231a8ac545983fb81b1c1fe8836aa3794f252c
Amanieu d'Antras
2017-08-21T14:06:12
Fix a race condition when an unpark operation times out
diff --git a/core/src/thread_parker/generic.rs b/core/src/thread_parker/generic.rs index 09e730a..3ab84a9 100644 --- a/core/src/thread_parker/generic.rs +++ b/core/src/thread_parker/generic.rs @@ -33,6 +33,10 @@ impl ThreadParker { // Checks if the park timed out. This should be called while holding the // qu...
2
13
1
8f00743a82454f8ba2e07a6baae687c330547e9a
Amanieu d'Antras
2017-08-15T07:33:15
Bump parking_lot version to 0.4.5
diff --git a/Cargo.toml b/Cargo.toml index 2829046..5a5c817 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.4.4" +version = "0.4.5" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
08937aa111a428546eca837304d43a37ccac010f
Amanieu d'Antras
2017-08-15T07:33:03
Bump parking_lot_core version to 0.2.3
diff --git a/core/Cargo.toml b/core/Cargo.toml index 8fdc701..5d7fe22 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot_core" -version = "0.2.2" +version = "0.2.3" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "An advanced API for creating custom syn...
1
1
1
d8d1fef5f33386a5b2c27310f4dd17bdb0917e1e
Amanieu d'Antras
2017-08-15T07:31:52
Take the address of a TLS variable instead of using the thread-id crate
diff --git a/Cargo.toml b/Cargo.toml index a13ac88..2829046 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,9 +13,6 @@ keywords = ["mutex", "condvar", "rwlock", "once", "thread"] parking_lot_core = { path = "core", version = "0.2" } owning_ref = { version = "0.3", optional = true } -[target.'cfg(not(target_os = "em...
3
2
17
82f40eef22e148cc5cbb02d3d1881e6a5272789c
Amanieu d'Antras
2017-08-15T07:30:56
Allow parking_lot to be used inside TLS destructors Fixes #37
diff --git a/core/src/lib.rs b/core/src/lib.rs index 73b6dd1..07ec80e 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -37,7 +37,7 @@ //! reference count and the two mutex bits in the same atomic word. #![warn(missing_docs)] -#![cfg_attr(feature = "nightly", feature(const_fn))] +#![cfg_attr(feature = "nightly"...
3
62
5
b3ea603341c1409a10c5a6743effb8f73afbd269
Bastien Orivel
2017-05-30T23:07:43
Allow the usage of smallvec 0.4 and bump version
diff --git a/core/Cargo.toml b/core/Cargo.toml index c6716bc..8fdc701 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot_core" -version = "0.2.1" +version = "0.2.2" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "An advanced API for creating custom syn...
1
2
2
c78619e394d111049df0d2884ca25b99e000cd8d
Amanieu d'Antras
2017-05-27T10:44:34
Bump parking_lot version to 0.4.4
diff --git a/Cargo.toml b/Cargo.toml index 6b54424..a13ac88 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.4.3" +version = "0.4.4" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
9bd537f27c0fd473a35fb8b1f35df5643d6de398
Amanieu d'Antras
2017-05-27T10:44:13
Fix a clippy warning
diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index db696fc..8a5599a 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -559,15 +559,15 @@ impl RawRwLock { // unlocking. If we are then we should set the exclusive // locked bit and tell the thread that we are...
1
7
7
4a28ca0c712c3d2b627133bce660f89718d007d0
Amanieu d'Antras
2017-05-27T10:35:46
Add support for recursive read locks to RwLock
diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index e35e0d5..db696fc 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -101,14 +101,22 @@ impl RawRwLock { } #[inline(always)] - fn try_lock_shared_fast(&self) -> bool { + fn try_lock_shared_fast(&self, recursive: bool) -> bool { le...
2
164
31
7aec6b22d1cf834a0c4886493e12563c3171f4a4
Amanieu d'Antras
2017-05-09T16:54:22
Bump parking_lot version to 0.4.3
diff --git a/Cargo.toml b/Cargo.toml index d08d0ca..6b54424 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.4.2" +version = "0.4.3" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
03cdadd49871624b9d2b681d6ede7c6e28accb4b
Amanieu d'Antras
2017-05-09T16:53:04
Fix double unlocking with *Guard::unlock_fair Fixes #29
diff --git a/src/mutex.rs b/src/mutex.rs index b60e3d4..c898c10 100644 --- a/src/mutex.rs +++ b/src/mutex.rs @@ -9,6 +9,7 @@ use std::cell::UnsafeCell; use std::ops::{Deref, DerefMut}; use std::time::{Duration, Instant}; use std::fmt; +use std::mem; use std::marker::PhantomData; use raw_mutex::RawMutex; @@ -300,...
3
6
0
21f2b838f40c41abcfb3f293a98468152ddc290d
Amanieu d'Antras
2017-05-09T04:30:36
Bump parking_lot version to 0.4.2
diff --git a/Cargo.toml b/Cargo.toml index f986e3a..d08d0ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.4.1" +version = "0.4.2" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
8576e097a9acc13218b72b90b26590db3d1f7a81
Amanieu d'Antras
2017-04-10T05:47:40
Fix NULL dereference in Condvar::notify_all
diff --git a/src/condvar.rs b/src/condvar.rs index a4115c8..d44f86b 100644 --- a/src/condvar.rs +++ b/src/condvar.rs @@ -143,19 +143,19 @@ impl Condvar { #[inline] pub fn notify_all(&self) { // Nothing to do if there are no waiting threads - if self.state.load(Ordering::Relaxed).is_null() { + ...
1
4
4
617f6153ecf33dfa1d083ebc736ac81f0e7f528b
Christopher Serr
2017-05-07T21:13:42
Fix Compile Error on emscripten
diff --git a/src/raw_remutex.rs b/src/raw_remutex.rs index a118c53..cc85279 100644 --- a/src/raw_remutex.rs +++ b/src/raw_remutex.rs @@ -23,7 +23,7 @@ fn get_thread_id() -> usize { // reserved value to indicate an empty slot. We instead fall // back to using the address of a thread-local variable, which ...
1
1
1
048da716161e8f560c8fbf4dadcd26d531d19f19
Amanieu d'Antras
2017-03-22T16:21:33
Bump parking_lot version to 0.4.1
diff --git a/Cargo.toml b/Cargo.toml index 52da295..f986e3a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.4.0" +version = "0.4.1" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
d15d08507350a7f25b46a6bc1d7b77986aa866e9
Amanieu d'Antras
2017-03-22T16:21:02
Remove the need for a separate Acquire fence after calling Once::state
diff --git a/src/once.rs b/src/once.rs index 1513529..07a5582 100644 --- a/src/once.rs +++ b/src/once.rs @@ -53,10 +53,6 @@ impl OnceState { /// Returns whether the associated `Once` has successfullly executed a /// closure. - /// - /// Note that you generally need an `Acquire` barrier after checking ...
1
1
5
8e15e805287b5e0004d7928fe16cbc2540c623d8
Amanieu d'Antras
2017-03-21T02:32:41
Bump parking_lot_core version to 0.2.1
diff --git a/core/Cargo.toml b/core/Cargo.toml index 97c2a2e..c6716bc 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot_core" -version = "0.2.0" +version = "0.2.1" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "An advanced API for creating custom syn...
1
1
1
c28f656d9efe3f233a078facdd9a19f4219ed9eb
Amanieu d'Antras
2017-03-21T01:49:32
Add support for WaitOnAddress/WakeByAddress on Windows
diff --git a/core/src/lib.rs b/core/src/lib.rs index a2e2379..73b6dd1 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -38,7 +38,7 @@ #![warn(missing_docs)] #![cfg_attr(feature = "nightly", feature(const_fn))] -#![cfg_attr(feature = "nightly", feature(integer_atomics))] +#![cfg_attr(all(feature = "nightly", ta...
5
320
106
d3b50298cfd19649b8d74fcc4de3259144901726
Amanieu d'Antras
2017-03-07T23:39:56
Bump parking_lot version to 0.4.0
diff --git a/Cargo.toml b/Cargo.toml index 8430d28..52da295 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.3.8" +version = "0.4.0" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
6dbd7545587d7f7e8c7a29a23103ee97d59ce91f
Amanieu d'Antras
2017-03-07T23:39:14
Add Once::state()
diff --git a/src/once.rs b/src/once.rs index 1c04005..c6e38cb 100644 --- a/src/once.rs +++ b/src/once.rs @@ -22,9 +22,21 @@ const POISON_BIT: U8 = 2; const LOCKED_BIT: U8 = 4; const PARKED_BIT: U8 = 8; -/// State yielded to the `call_once_force` method which can be used to query -/// whether the `Once` was previous...
1
54
5
ea11b9ff6c5e3f45e7cc3d817a1d4fe60228cb5d
Amanieu d'Antras
2017-03-06T18:18:18
Update owning_ref version to 0.3
diff --git a/Cargo.toml b/Cargo.toml index 10e3d1c..8430d28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["mutex", "condvar", "rwlock", "once", "thread"] [dependencies] parking_lot_core = { path = "core", version = "0.2" } -owning_ref = { version = "0.2", optional = true } +owning_ref = { v...
1
1
1
18c35ab03e70fe5c820a1bc1a8570133d9a6266d
Amanieu d'Antras
2017-02-12T00:05:47
Bump parking_lot version to 0.3.8
diff --git a/Cargo.toml b/Cargo.toml index 7cd05be..10e3d1c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.3.7" +version = "0.3.8" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
998f9a7e5bf2d9d3cc1a875d26d30bbe6883f71c
Amanieu d'Antras
2017-02-12T00:05:26
Add RwLock::raw_downgrade
diff --git a/src/rwlock.rs b/src/rwlock.rs index d300213..582e661 100644 --- a/src/rwlock.rs +++ b/src/rwlock.rs @@ -378,6 +378,22 @@ impl<T: ?Sized> RwLock<T> { pub unsafe fn raw_unlock_write_fair(&self) { self.raw.unlock_exclusive(true); } + + /// Atomically downgrades a write lock into a read l...
1
16
0
eb92e2c5426085f7d73d812f3344f236c3af8c3a
Amanieu d'Antras
2017-02-02T13:22:01
Bump parking_lot version to 0.3.7
diff --git a/Cargo.toml b/Cargo.toml index fed6420..7cd05be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.3.6" +version = "0.3.7" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
64c163559c897427a22ccabe2eaa100f40021f0c
Amanieu d'Antras
2016-10-19T14:04:32
Bump parking_lot version to 0.3.6
diff --git a/Cargo.toml b/Cargo.toml index 0b1dbf4..2526d2e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.3.5" +version = "0.3.6" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
664850e7ce72cfc40ac8af4b8fdf4d2bed22540c
Amanieu d'Antras
2016-10-19T13:43:12
Fix handling of timeouts in RwLock::try_write_{for,until}
diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index ea566e0..e35e0d5 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -235,7 +235,12 @@ impl RawRwLock { } }; let before_sleep = || {}; - let timed_out = |_, _| unreachable!(); + ...
1
6
1
bf45ee3a69cb393f8d2dcf374b58946346bf3c14
Amanieu d'Antras
2016-10-06T21:58:09
Bump parking_lot version to 0.3.5
diff --git a/Cargo.toml b/Cargo.toml index ad1ed67..0b1dbf4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.3.4" +version = "0.3.5" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
34b740679256a3e8b1fbb95c9555eca7b1462ca2
Andrew Paseltiner
2016-10-06T21:46:15
Make `owning_ref` dependency optional
diff --git a/Cargo.toml b/Cargo.toml index 6b1a74c..ad1ed67 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,10 +11,11 @@ keywords = ["mutex", "condvar", "rwlock", "once", "thread"] [dependencies] parking_lot_core = { path = "core", version = "0.2" } -owning_ref = "0.2" +owning_ref = { version = "0.2", optional = tr...
4
21
5
de8aca4485836b7fa796b806647411e96365f0b5
Amanieu d'Antras
2016-10-04T00:10:33
Bump parking_lot version to 0.3.4
diff --git a/Cargo.toml b/Cargo.toml index 5a192c1..6b1a74c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.3.3" +version = "0.3.4" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
465ce1e7e7e93e9923495bfdae12d7a36a57f745
Amanieu d'Antras
2016-10-04T00:08:49
Bump parking_lot_core version to 0.2.0
diff --git a/Cargo.toml b/Cargo.toml index a237728..5a192c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ readme = "README.md" keywords = ["mutex", "condvar", "rwlock", "once", "thread"] [dependencies] -parking_lot_core = { path = "core", version = "0.1" } +parking_lot_core = { path = "core", version =...
2
2
2
79aba3f4f3e4e86dabfe1bbd3879f5022a49cdbd
Amanieu d'Antras
2016-10-04T00:09:49
Add timed lock to Mutex and RwLock
diff --git a/core/src/lib.rs b/core/src/lib.rs index e67a146..a2e2379 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -73,7 +73,7 @@ mod spinwait; mod word_lock; mod parking_lot; -pub use parking_lot::{UnparkResult, RequeueOp, UnparkToken, ParkToken, FilterOp}; +pub use parking_lot::{ParkResult, UnparkResult,...
7
294
90
135292cf86bb7309b09e42ef78dd674c2d4d726e
Amanieu d'Antras
2016-09-27T17:36:25
Bump parking_lot version to 0.3.3
diff --git a/Cargo.toml b/Cargo.toml index 72042cf..a237728 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.3.2" +version = "0.3.3" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
3a1baba65d0c22f684d690ba03fd22dacd59fa8c
Amanieu d'Antras
2016-09-27T17:35:54
Add integration with owning_ref
diff --git a/Cargo.toml b/Cargo.toml index 762dfdf..72042cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ keywords = ["mutex", "condvar", "rwlock", "once", "thread"] [dependencies] parking_lot_core = { path = "core", version = "0.1" } +owning_ref = "0.2" [dev-dependencies] rand = "0.3" diff --git a...
6
25
30
137d45335a1e7bff916d7d27c918790a592686a5
Amanieu d'Antras
2016-09-17T11:17:00
Bump parking_lot_core version to 0.1.4
diff --git a/core/Cargo.toml b/core/Cargo.toml index c06a488..551ea51 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot_core" -version = "0.1.2" +version = "0.1.4" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "An advanced API for creating custom syn...
1
1
1
979487788d4c9048b1c25b967afd37ee92dc90b6
Amanieu d'Antras
2016-09-17T11:14:03
Update minimum libc version to 0.2.15 Fixes #13
diff --git a/core/Cargo.toml b/core/Cargo.toml index 49a658b..c06a488 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -13,7 +13,7 @@ smallvec = "0.1" rand = "0.3" [target.'cfg(unix)'.dependencies] -libc = "0.2" +libc = "0.2.15" [target.'cfg(windows)'.dependencies] winapi = "0.2"
1
1
1
6b1325a20214f50e685444e4f810364ade3589cd
Andrew Paseltiner
2016-09-10T20:25:49
Fix typo in `parking_lot` docs
diff --git a/core/src/lib.rs b/core/src/lib.rs index 805326c..e67a146 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -22,7 +22,7 @@ //! There are two main operations that can be performed on the parking lot: //! - *Parking* refers to suspending the thread while simultaneously enqueuing it //! on a queue keye...
1
1
1
abd23dea8528e3170d2aa8a491944db3f3ad48e0
Mrmaxmeier
2016-09-10T09:58:14
cast suseconds_t to c_long (#11)
diff --git a/core/src/thread_parker/unix.rs b/core/src/thread_parker/unix.rs index 987be3e..c180027 100644 --- a/core/src/thread_parker/unix.rs +++ b/core/src/thread_parker/unix.rs @@ -174,7 +174,7 @@ unsafe fn timespec_now() -> libc::timespec { debug_assert_eq!(r, 0); libc::timespec { tv_sec: now.tv...
1
1
1
b43b5d849580167818e273729ec790d780526151
Amanieu d'Antras
2016-09-04T14:32:07
Bump parking_lot version to 0.3.2
diff --git a/Cargo.toml b/Cargo.toml index 5332dbd..762dfdf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.3.1" +version = "0.3.2" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
7d7580f5628cd908455a61d26946bb05662c4ffc
Amanieu d'Antras
2016-09-04T14:31:44
Bump parking_lot_core version to 0.1.2
diff --git a/core/Cargo.toml b/core/Cargo.toml index accbdf9..49a658b 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot_core" -version = "0.1.1" +version = "0.1.2" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "An advanced API for creating custom syn...
1
1
1
bbe643a4a0169294aa814ca21b6aef204b28a52c
Amanieu d'Antras
2016-09-04T14:30:32
Attempt to use monotonic time for the unix ThreadParker if possible
diff --git a/core/src/thread_parker/unix.rs b/core/src/thread_parker/unix.rs index c35fa45..987be3e 100644 --- a/core/src/thread_parker/unix.rs +++ b/core/src/thread_parker/unix.rs @@ -6,14 +6,18 @@ // copied, modified, or distributed except according to those terms. use std::cell::{Cell, UnsafeCell}; -use std::tim...
2
96
32
d76d5ee4a6284d60f01a6d8334c8b52d06a3aa01
Amanieu d'Antras
2016-08-27T10:19:00
Bump parking_lot version to 0.3.1
diff --git a/Cargo.toml b/Cargo.toml index 549b643..5332dbd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.3.0" +version = "0.3.1" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synch...
1
1
1
152907087a4feedb350f915b0e779414ab030414
Amanieu d'Antras
2016-08-27T06:33:41
Fixed a race condition in RwLock read unlock
diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index f6a961e..62ecef0 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -243,7 +243,7 @@ impl RawRwLock { let addr = self as *const _ as usize; let filter = |token| -> FilterOp { if let Some(first_token) = first_token...
1
34
29
b8192ab62af8f991af151a49153c74c6e6464c45
Amanieu d'Antras
2016-08-26T23:56:44
Bump parking_lot_core version to 0.1.1
diff --git a/core/Cargo.toml b/core/Cargo.toml index 591284e..accbdf9 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot_core" -version = "0.1.0" +version = "0.1.1" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "An advanced API for creating custom syn...
1
1
1
3a96951bce880528ddf6a6480cd2f95d4e73dba7
Amanieu d'Antras
2016-08-26T23:31:10
Fix the Win32 ThreadParker
diff --git a/core/src/thread_parker/windows.rs b/core/src/thread_parker/windows.rs index 973d4e9..9ebbbd2 100644 --- a/core/src/thread_parker/windows.rs +++ b/core/src/thread_parker/windows.rs @@ -68,23 +68,23 @@ impl KeyedEvent { #[allow(non_snake_case)] unsafe fn create() -> Box<KeyedEvent> { - let...
1
5
5
f4f59c9799f71b6f41cd7836a15e7eee31db6154
Amanieu d'Antras
2016-08-26T23:15:53
Add a copy of util.rs and stable.rs to parking_lot
diff --git a/src/lib.rs b/src/lib.rs index da5b2c9..fb7c697 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,12 +17,9 @@ extern crate parking_lot_core; #[cfg(not(feature = "nightly"))] -#[path = "../core/src/stable.rs"] mod stable; -#[path = "../core/src/util.rs"] mod util; - mod elision; mod raw_mutex; mod r...
3
117
3
d7592a69d1f6129ea674a409ac8c069086f0a58c
Amanieu d'Antras
2016-08-26T23:11:42
Add version for parking_lot_core in Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index 0f71e86..549b643 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ readme = "README.md" keywords = ["mutex", "condvar", "rwlock", "once", "thread"] [dependencies] -parking_lot_core = { path = "core" } +parking_lot_core = { path = "core", version = "0.1" } [dev-...
1
1
1
57b8712419472f6a7d0ca822a5fd9f7d6f311826
Amanieu d'Antras
2016-08-25T06:25:07
Simplify the mutex unlocking logic
diff --git a/src/raw_mutex.rs b/src/raw_mutex.rs index 96427c7..1cf090c 100644 --- a/src/raw_mutex.rs +++ b/src/raw_mutex.rs @@ -174,46 +174,37 @@ impl RawMutex { #[cold] #[inline(never)] fn unlock_slow(&self, force_fair: bool) { - let mut state = self.state.load(Ordering::Relaxed); - loop ...
1
28
37
520174fd5b6a7e7412e0fe8ee917c3f822972da6
Amanieu d'Antras
2016-08-16T14:56:33
Bump version to 0.2.8
diff --git a/Cargo.toml b/Cargo.toml index 27c2c8b..6be55fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.2.7" +version = "0.2.8" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "Compact and efficient synchronization primitives. Also provides ...
1
1
1
1040d5040a47103e102a49a08c139a526fe475fa
Amanieu d'Antras
2016-08-16T10:51:30
Remove the use of lazy_static! in tests
diff --git a/Cargo.toml b/Cargo.toml index b2a3b7a..27c2c8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,6 @@ kernel32-sys = "0.2" [dev-dependencies] rand = "0.3" -lazy_static = "0.2" [features] nightly = [] diff --git a/src/condvar.rs b/src/condvar.rs index 3c55352..94f9f12 100644 --- a/src/condvar.rs...
5
64
72
b933a94039b33498673a83959aae8f98eea860a2
Amanieu d'Antras
2016-08-16T10:51:21
Clean up the RawRwLock implementation a bit
diff --git a/src/raw_mutex.rs b/src/raw_mutex.rs index ed6688d..6600729 100644 --- a/src/raw_mutex.rs +++ b/src/raw_mutex.rs @@ -137,9 +137,8 @@ impl RawMutex { // Park our thread until we are woken up by an unlock unsafe { let addr = self as *const _ as usize; - ...
2
36
40
4841f65004c17fba01f1d5b1eb8a59e143ab9c36
Amanieu d'Antras
2016-08-16T10:45:32
Clean up the Condvar::wait implementation
diff --git a/src/condvar.rs b/src/condvar.rs index 17e0332..3c55352 100644 --- a/src/condvar.rs +++ b/src/condvar.rs @@ -209,48 +209,7 @@ impl Condvar { /// with a different `Mutex` object. #[inline] pub fn wait<T: ?Sized>(&self, mutex_guard: &mut MutexGuard<T>) { - self.wait_internal(guard_lock(m...
1
11
56
9840d0c72d111d2ef24b366b66cde6cdd2cd832e
Amanieu d'Antras
2016-07-29T00:05:01
Remove unneeded feature on nightly
diff --git a/src/lib.rs b/src/lib.rs index d7aaafb..d850896 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -138,7 +138,6 @@ //! atomic reference count and the two mutex bits in the same atomic word. #![warn(missing_docs)] -#![cfg_attr(feature = "nightly", feature(extended_compare_and_swap))] #![cfg_attr(feature = "ni...
1
0
1
7ba3f12f82cf37e091a719fb8e0262177125cde8
Amanieu d'Antras
2016-07-28T17:35:36
Bump version to 0.2.7
diff --git a/Cargo.toml b/Cargo.toml index 5fea99c..b2a3b7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.2.6" +version = "0.2.7" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "Compact and efficient synchronization primitives. Also provides ...
1
1
1
b84da3a7a182b6116f0c31f066fad6e455eea56d
Amanieu d'Antras
2016-07-28T17:25:05
Clean up ThreadParker implementations and fix memory orderings
diff --git a/src/thread_parker/generic.rs b/src/thread_parker/generic.rs index 85a6260..09e730a 100644 --- a/src/thread_parker/generic.rs +++ b/src/thread_parker/generic.rs @@ -61,7 +61,7 @@ impl ThreadParker { true } - // Lock the parker to prevent the target thread from exiting. This is + // Loc...
4
20
17
3af1d12324b278fec1d641f6c204693b1609eac3
Chirantan Ekbote
2016-07-17T07:37:20
Improve benchmark reporting When benchmarking a synchronization primitive, raw throughput is not the only statistic that matters. For example, it is also important that threads do not starve waiting to acquire a lock. Improve the benchmark reporting so that it reports the throughput per thread per second. This makes...
diff --git a/benchmark/src/mutex.rs b/benchmark/src/mutex.rs index 0c901d5..5fd16cb 100644 --- a/benchmark/src/mutex.rs +++ b/benchmark/src/mutex.rs @@ -124,10 +124,18 @@ fn run_benchmark<M: Mutex<f64> + Send + Sync + 'static>(num_threads: usize, thread::sleep(Duration::new(seconds_per_test as u64, 0)); keep_...
1
16
3
d002fde10bc9a00533976f103d7bd234c81ae5cf
Joe Wilm
2016-07-13T19:54:24
Fix doc on Mutex `try_lock` returns an `Option`, not a `Result`.
diff --git a/src/mutex.rs b/src/mutex.rs index 82350d8..a6453cc 100644 --- a/src/mutex.rs +++ b/src/mutex.rs @@ -134,7 +134,7 @@ impl<T: ?Sized> Mutex<T> { /// Attempts to acquire this lock. /// - /// If the lock could not be acquired at this time, then `Err` is returned. + /// If the lock could not b...
1
1
1
e5d1e279a6152937c04cb9d2920ccdbc714bb99a
Andrew Paseltiner
2016-06-29T21:36:10
Fix typo in docs
diff --git a/src/mutex.rs b/src/mutex.rs index 2b18928..82350d8 100644 --- a/src/mutex.rs +++ b/src/mutex.rs @@ -77,8 +77,8 @@ unsafe impl<T: Send> Sync for Mutex<T> {} /// An RAII implementation of a "scoped lock" of a mutex. When this structure is /// dropped (falls out of scope), the lock will be unlocked. /// -/...
1
2
2
d72b8e4ef54eab932f00b54d8e29f4e4f4b38e52
Amanieu d'Antras
2016-06-03T01:56:16
Bump version to 0.2.6
diff --git a/Cargo.toml b/Cargo.toml index 66ab799..5fea99c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.2.5" +version = "0.2.6" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "Compact and efficient synchronization primitives. Also provides ...
1
1
1
12616a740263e7227c6fbe82b99abf34925546c7
Amanieu d'Antras
2016-06-03T00:53:37
Add support for downgrading to RwLock
diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index cd79ddc..d900928 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -78,6 +78,17 @@ impl RawRwLock { self.unlock_exclusive_slow(); } + #[inline] + pub fn downgrade(&self) { + let state = self.state + .fetch_add(SHARE...
2
67
0
e710fae03cea01aa7a39f9ecca0bdc36deb115b7
Amanieu d'Antras
2016-06-03T00:35:59
Use raw pointers in mutex and rwlock guards
diff --git a/src/mutex.rs b/src/mutex.rs index 6ce4852..2b18928 100644 --- a/src/mutex.rs +++ b/src/mutex.rs @@ -8,6 +8,7 @@ use std::cell::UnsafeCell; use std::ops::{Deref, DerefMut}; use std::fmt; +use std::marker::PhantomData; use raw_mutex::RawMutex; /// A mutual exclusion primitive useful for protecting sha...
3
53
48
cde68ffd408d15388d57b4c167799f0f00f37dc9
Amanieu d'Antras
2016-05-28T17:05:15
Add SeqLock to benchmarks
diff --git a/benchmark/Cargo.toml b/benchmark/Cargo.toml index b63ef84..6dd1ea4 100644 --- a/benchmark/Cargo.toml +++ b/benchmark/Cargo.toml @@ -5,6 +5,7 @@ authors = ["Amanieu d'Antras <amanieu@gmail.com>"] [dependencies] parking_lot = {path = ".."} +seqlock = "0.1" libc = "0.2" [[bin]] diff --git a/benchmark/...
2
26
0
6f64e9d86c4c3667f9dd6766b43d616c5e9cf5d8
Amanieu d'Antras
2016-05-27T07:53:13
Bump version to 0.2.5
diff --git a/Cargo.toml b/Cargo.toml index 2646196..66ab799 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.2.4" +version = "0.2.5" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "Compact and efficient synchronization primitives. Also provides ...
1
1
1
c6dfc4466aae99425c214cc6bcf0fe9604ae3d6f
Amanieu d'Antras
2016-05-27T04:09:54
Add proper support for adaptive spinning with exponential backoff
diff --git a/src/lib.rs b/src/lib.rs index 21ab1dd..984603a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -129,9 +129,7 @@ #![cfg_attr(feature = "nightly", feature(extended_compare_and_swap))] #![cfg_attr(feature = "nightly", feature(const_fn))] #![cfg_attr(feature = "nightly", feature(integer_atomics))] -#![cfg_attr(...
6
150
43
4b439239ac7922b327f28d2a871123d11091374f
Amanieu d'Antras
2016-05-27T04:36:38
Clean up ThreadParker, also fixes potential undefined behavior
diff --git a/src/parking_lot.rs b/src/parking_lot.rs index 07a96b0..227f8c0 100644 --- a/src/parking_lot.rs +++ b/src/parking_lot.rs @@ -533,9 +533,9 @@ pub unsafe fn unpark_one(key: usize, callback: &mut FnMut(UnparkResult)) -> Unpa // times out. Then we unlock the queue since we don't want to keep ...
6
92
37
46d761834e6a9f2aceb056af2af2e3d54c806bd0
Amanieu d'Antras
2016-05-26T15:23:40
Make the WordLock queue lock-free instead of using a spinlock
diff --git a/src/word_lock.rs b/src/word_lock.rs index 87b0b9d..460dd7a 100644 --- a/src/word_lock.rs +++ b/src/word_lock.rs @@ -6,9 +6,9 @@ // copied, modified, or distributed except according to those terms. #[cfg(feature = "nightly")] -use std::sync::atomic::{AtomicUsize, Ordering}; +use std::sync::atomic::{Atom...
1
114
66
15869753e43669f5941b477c130f2f9ff1189169
Amanieu d'Antras
2016-05-26T12:51:44
Allow lock elision to be used in the RwLock slow path
diff --git a/src/elision.rs b/src/elision.rs index 3b2f874..02a5243 100644 --- a/src/elision.rs +++ b/src/elision.rs @@ -15,9 +15,15 @@ pub trait AtomicElisionExt { type IntType; // Perform a compare_exchange and start a transaction - fn elision_acquire(&self, current: Self::IntType, new: Self::IntType) ...
2
54
28
616458dae8b0c9b3f1b53f5457105ae9e3b00e81
Amanieu d'Antras
2016-05-26T06:03:40
Make the benchmark run on Windows
diff --git a/benchmark/src/mutex.rs b/benchmark/src/mutex.rs index 863d82d..0c901d5 100644 --- a/benchmark/src/mutex.rs +++ b/benchmark/src/mutex.rs @@ -15,6 +15,7 @@ use std::thread; use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; use std::time::Duration; +#[cfg(unix)] use std::cell::UnsafeCell;...
2
33
11
221a981d1fb77ef01c5f1d16ebbd7cc82dbf5268
Amanieu d'Antras
2016-05-25T08:38:49
timespec doesn't need to be mutable
diff --git a/src/thread_parker/unix.rs b/src/thread_parker/unix.rs index 62a95d9..eb71603 100644 --- a/src/thread_parker/unix.rs +++ b/src/thread_parker/unix.rs @@ -65,7 +65,7 @@ impl ThreadParker { // Convert the timeout to a target system time let diff = timeout - now; - let mut...
1
12
9
28603d8722ec0e99bf22de598beb24f28ad66226
Amanieu d'Antras
2016-05-25T07:34:42
Remove stray newline
diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index fc6b445..74f35c9 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -399,7 +399,6 @@ impl RawRwLock { } } - // Release the shared lock and clear the shared parked bit if there // are no pending excl...
1
0
1
ae558dd3c5436b4b6ff86ce274e669a7e144e4a5
Amanieu d'Antras
2016-05-25T07:09:38
Bump version to 0.2.4
diff --git a/Cargo.toml b/Cargo.toml index 2182b4d..2646196 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.2.3" +version = "0.2.4" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "Compact and efficient synchronization primitives. Also provides ...
1
1
1
9aee85fd260a4684cf23bd2e66566ca1daf75a37
Amanieu d'Antras
2016-05-25T05:53:41
Make the core of Condvar::wait and Condvar::wait_until non-generic
diff --git a/src/condvar.rs b/src/condvar.rs index 3e03816..539ce81 100644 --- a/src/condvar.rs +++ b/src/condvar.rs @@ -204,28 +204,35 @@ impl Condvar { /// /// This function will panic if another thread is waiting on the `Condvar` /// with a different `Mutex` object. - pub fn wait<T: ?Sized>(&self, ...
1
26
13
358b21a0420859bbea5a20520ef19ae8714fe817
Amanieu d'Antras
2016-05-25T05:06:28
Wrap pthread types in UnsafeCell in benchmarks
diff --git a/benchmark/src/mutex.rs b/benchmark/src/mutex.rs index c9900f8..863d82d 100644 --- a/benchmark/src/mutex.rs +++ b/benchmark/src/mutex.rs @@ -51,19 +51,19 @@ impl<T> Mutex<T> for parking_lot::Mutex<T> { } } -struct PthreadMutex<T>(UnsafeCell<T>, libc::pthread_mutex_t); +struct PthreadMutex<T>(UnsafeC...
2
24
10
61ddee6f6f83d5cac280aa39f6924605e18aff98
Amanieu d'Antras
2016-05-25T03:39:26
Add a pthread implementation of ThreadParker
diff --git a/Cargo.toml b/Cargo.toml index b654436..2182b4d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ keywords = ["mutex", "condvar", "rwlock", "once", "thread"] [dependencies] smallvec = "0.1" -[target.'cfg(target_os = "linux")'.dependencies] +[target.'cfg(unix)'.dependencies] libc = "0.2" [ta...
6
189
49
04ed500162e4e07a3eaa201c47e3779a0c3cbd17
Amanieu d'Antras
2016-05-25T01:14:31
Clean up RawRwLock a bit
diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index c9879e1..fc6b445 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -102,29 +102,26 @@ impl RawRwLock { #[inline] pub fn try_lock_shared(&self) -> bool { - let mut state = self.state.load(Ordering::Relaxed); - loop { - ...
1
101
56