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 |
|---|---|---|---|---|---|---|---|
930d23873e24e09aea0f9efc9946ac9435313744 | Amanieu d'Antras | 2019-01-12T21:53:29 | Use const fn Atomic* constructors instead of the old constants | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index c503aad..5557fd5 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -12,14 +12,14 @@ use std::cell::{Cell, UnsafeCell};
#[cfg(not(has_localkey_try_with))]
use std::panic;
use std::ptr;
-use std::sync::atomic::{AtomicPtr, AtomicUs... | 5 | 14 | 21 |
7df8244b975f9b2f2e149e80562f910563e110f5 | Amanieu d'Antras | 2019-01-12T21:53:08 | Fix race conditions in deadlock detection | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index 66be2ae..c503aad 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -71,7 +71,7 @@ struct Bucket {
impl Bucket {
pub fn new() -> Self {
Self {
- mutex: WordLock::new(),
+ mutex: WordLock::INIT,
... | 3 | 34 | 7 |
ec964482216ac75d89ade1d683557d1100e0865e | Amanieu d'Antras | 2019-01-02T00:49:13 | Remove non-generic version of parking_lot API
This API is only used in cold paths, so there is no point avoiding
monomorphization costs. | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index 66be2ae..246b958 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -558,28 +558,6 @@ where
B: FnOnce(),
T: FnOnce(usize, bool),
{
- let mut v = Some(validate);
- let mut b = Some(before_sleep);
- let mut t = Som... | 1 | 0 | 58 |
5977113b42f041bc0ba0c1bacea6296a5588b92f | Amanieu d'Antras | 2019-01-01T14:03:23 | Fix potential deadlock when upgrading a RwLock | diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs
index 5a4e26b..de70066 100644
--- a/src/raw_rwlock.rs
+++ b/src/raw_rwlock.rs
@@ -951,32 +951,30 @@ impl RawRwLock {
// potential race condition here: another thread might grab a shared
// lock between now and when we actually release our lock.
... | 1 | 16 | 18 |
69f888569b7bb00edeaee76bd90ed0583513467a | Linus Färnstrand | 2018-12-15T14:05:49 | Use cfg! where possible | diff --git a/src/condvar.rs b/src/condvar.rs
index a9923a2..cb85e88 100644
--- a/src/condvar.rs
+++ b/src/condvar.rs
@@ -564,10 +564,11 @@ mod tests {
c2.notify_one();
});
// Non-nightly panics on too large timeouts. Nightly treats it as indefinite wait.
- #[cfg(feature = "nightly"... | 1 | 5 | 4 |
6d8fa720f241ee6b399e72c4edcc684e4a335a2f | Linus Färnstrand | 2018-12-15T13:31:04 | Remove risk of panicking in wait_for style functions | diff --git a/src/condvar.rs b/src/condvar.rs
index d2aa376..a9923a2 100644
--- a/src/condvar.rs
+++ b/src/condvar.rs
@@ -13,6 +13,7 @@ use raw_mutex::{RawMutex, TOKEN_HANDOFF, TOKEN_NORMAL};
use std::sync::atomic::{AtomicPtr, Ordering};
use std::time::{Duration, Instant};
use std::{fmt, ptr};
+use util;
/// A typ... | 5 | 27 | 15 |
edeaa24336f7fc3bac97a75acfdd36e6814ace63 | Linus Färnstrand | 2018-12-15T13:30:43 | Add test on panicking wait_for | diff --git a/src/condvar.rs b/src/condvar.rs
index eb757d5..d2aa376 100644
--- a/src/condvar.rs
+++ b/src/condvar.rs
@@ -555,12 +555,20 @@ mod tests {
let mut g = m.lock();
let no_timeout = c.wait_for(&mut g, Duration::from_millis(1));
assert!(no_timeout.timed_out());
+
let _t = thre... | 1 | 9 | 1 |
6e92f139b1a070072ef98b1c82f66364e4bca7e7 | Linus Färnstrand | 2018-12-14T21:46:47 | Simplify with_thread_data | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index ff663a9..66be2ae 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -179,18 +179,12 @@ where
}
// Unlike word_lock::ThreadData, parking_lot::ThreadData is always expensive
- // to construct. Try to use a thread-local ... | 1 | 5 | 11 |
01e0f8d018f016b3571f8ade46171efbd96295b9 | Linus Färnstrand | 2018-12-08T22:51:20 | Only store DeadlockData if feature is activated | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index 69904cd..ff663a9 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -136,8 +136,7 @@ struct ThreadData {
parked_with_timeout: Cell<bool>,
// Extra data for deadlock detection
- // FIXME: once supported in stable repla... | 1 | 2 | 12 |
73504893aecb0b906da36b33ed49c430e750f518 | Linus Färnstrand | 2018-12-08T22:46:02 | Format codebase with latest rustfmt | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index 4b524b8..69904cd 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -588,7 +588,6 @@ unsafe fn park_internal(
) -> ParkResult {
// Grab our thread data, this also ensures that the hash table exists
with_thread_data(|threa... | 11 | 82 | 56 |
a1e7769943b9fb029c0652fb57cbc7f490c74e23 | Linus Färnstrand | 2018-12-07T12:29:06 | Add FIXME note about checked_add of Instant + Duration | diff --git a/src/condvar.rs b/src/condvar.rs
index 19ca586..eb757d5 100644
--- a/src/condvar.rs
+++ b/src/condvar.rs
@@ -397,7 +397,7 @@ impl Condvar {
guard: &mut MutexGuard<T>,
timeout: Duration,
) -> WaitTimeoutResult {
- // FIXME: Change to Intstant::now().checked_add(timeout) when sta... | 3 | 7 | 1 |
c84b8de62f93dfda6a614e4008f488c31b60674f | Linus Färnstrand | 2018-12-04T00:10:09 | Add documentation on when Condvar::wait_for can panic | diff --git a/src/condvar.rs b/src/condvar.rs
index 0e22beb..19ca586 100644
--- a/src/condvar.rs
+++ b/src/condvar.rs
@@ -387,12 +387,17 @@ impl Condvar {
///
/// Like `wait`, the lock specified will be re-acquired when this function
/// returns, regardless of whether the timeout elapsed or not.
+ ///
... | 1 | 5 | 0 |
0aec0c9030eade1f45fa512d06e8e84f93951e5e | Linus Färnstrand | 2018-12-03T17:26:13 | Port with_thread_data from word_lock into parking_lot | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index 35c245d..4b524b8 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -162,8 +162,11 @@ impl ThreadData {
}
}
-// Returns a ThreadData structure for the current thread
-unsafe fn get_thread_data(local: &mut Option<ThreadData>)... | 1 | 110 | 102 |
e3409004b6215d7d64d1aaa6fc124374f73073dc | Linus Färnstrand | 2018-12-03T16:40:56 | Use #[derive(Default)] on SpinWait | diff --git a/core/src/spinwait.rs b/core/src/spinwait.rs
index 8851888..6912d43 100644
--- a/core/src/spinwait.rs
+++ b/core/src/spinwait.rs
@@ -18,6 +18,7 @@ fn cpu_relax(iterations: u32) {
}
/// A counter used to perform exponential backoff in spin loops.
+#[derive(Default)]
pub struct SpinWait {
counter: u... | 1 | 3 | 9 |
f5f6be35fbf3c9066964428448467112e0558b3a | Linus Färnstrand | 2018-12-01T16:28:32 | Move thread_yield into thread_parker module | diff --git a/core/src/spinwait.rs b/core/src/spinwait.rs
index 4185026..8851888 100644
--- a/core/src/spinwait.rs
+++ b/core/src/spinwait.rs
@@ -5,53 +5,8 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
-#[cfg(unix)... | 5 | 49 | 49 |
8bcfae3d1c8b8fff72e485b02e557f8a1e1cc7be | Linus Färnstrand | 2018-12-01T15:50:05 | Create ThreadParker::IS_CHEAP_TO_CONSTRUCT
Use instead of conditional compile directly in
word_lock.rs | diff --git a/core/src/thread_parker/generic.rs b/core/src/thread_parker/generic.rs
index c9205c6..d67efc8 100644
--- a/core/src/thread_parker/generic.rs
+++ b/core/src/thread_parker/generic.rs
@@ -18,6 +18,8 @@ pub struct ThreadParker {
}
impl ThreadParker {
+ pub const IS_CHEAP_TO_CONSTRUCT: bool = true;
+
... | 5 | 9 | 1 |
33ccac47cf59702c78f922ece8aed98db81f2546 | Linus Färnstrand | 2018-12-01T15:43:06 | Use FIXME instead of TODO | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index 4c34df8..35c245d 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -136,7 +136,7 @@ struct ThreadData {
parked_with_timeout: Cell<bool>,
// Extra data for deadlock detection
- // TODO: once supported in stable replac... | 1 | 1 | 1 |
08eb3add7cbc46dcf7c5bdbef30140766455e8d0 | Linus Färnstrand | 2018-12-07T00:43:47 | One unsafe block instead of many small | diff --git a/core/src/thread_parker/windows/waitaddress.rs b/core/src/thread_parker/windows/waitaddress.rs
index bba4ad2..91e4954 100644
--- a/core/src/thread_parker/windows/waitaddress.rs
+++ b/core/src/thread_parker/windows/waitaddress.rs
@@ -31,28 +31,29 @@ pub struct WaitAddress {
impl WaitAddress {
#[allow(n... | 1 | 21 | 20 |
a70199b0b8943cb129a490a4fba764ff76093683 | Linus Färnstrand | 2018-12-07T00:25:15 | Fix comment | diff --git a/core/src/thread_parker/windows/mod.rs b/core/src/thread_parker/windows/mod.rs
index db45179..07e2294 100644
--- a/core/src/thread_parker/windows/mod.rs
+++ b/core/src/thread_parker/windows/mod.rs
@@ -40,7 +40,7 @@ impl Backend {
);
}
- // Try to create a new object
+ /... | 1 | 1 | 1 |
c83b20aedb02776a654aa99a8a16a9702c54b4ab | Linus Färnstrand | 2018-12-07T00:23:59 | Make Windows thread parker creation safe | diff --git a/core/src/thread_parker/windows/keyed_event.rs b/core/src/thread_parker/windows/keyed_event.rs
index 8332941..5a3a11f 100644
--- a/core/src/thread_parker/windows/keyed_event.rs
+++ b/core/src/thread_parker/windows/keyed_event.rs
@@ -49,49 +49,52 @@ impl KeyedEvent {
}
#[allow(non_snake_case)]
- ... | 3 | 55 | 49 |
88635ac1a69c65f26fc6983ec755753b5028680b | Linus Färnstrand | 2018-12-06T23:43:40 | Get rid of unused unsafe warning | diff --git a/core/src/word_lock.rs b/core/src/word_lock.rs
index 281cbfb..3ebb57b 100644
--- a/core/src/word_lock.rs
+++ b/core/src/word_lock.rs
@@ -149,6 +149,9 @@ impl WordLock {
// Get our thread data and prepare it for parking
state = with_thread_data(|thread_data| {
+ // ... | 1 | 5 | 0 |
7e3a5dc008c3736a5ef23d6c6073451bfd532fb6 | Linus Färnstrand | 2018-12-01T15:59:50 | Replace generic ThreadParker with a spin-based one | diff --git a/core/src/thread_parker/generic.rs b/core/src/thread_parker/generic.rs
index d06406a..c9205c6 100644
--- a/core/src/thread_parker/generic.rs
+++ b/core/src/thread_parker/generic.rs
@@ -5,62 +5,53 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distri... | 1 | 25 | 45 |
12486619f830d5cd9857cfbc08c210b8ae93d403 | Linus Färnstrand | 2018-12-06T23:33:29 | Mark a few things in unix ThreadParker as safe | diff --git a/core/src/thread_parker/unix.rs b/core/src/thread_parker/unix.rs
index 169586b..6ec12ed 100644
--- a/core/src/thread_parker/unix.rs
+++ b/core/src/thread_parker/unix.rs
@@ -195,9 +195,9 @@ impl UnparkHandle {
// Returns the current time on the clock used by pthread_cond_t as a timespec.
#[cfg(any(target... | 1 | 7 | 7 |
88af312a1ae116a03784f788b80e958e38b90aee | Linus Färnstrand | 2018-12-06T23:15:03 | Mark many methods in Linux ThreadParker as safe | diff --git a/core/src/thread_parker/linux.rs b/core/src/thread_parker/linux.rs
index 4a13d73..3a495d1 100644
--- a/core/src/thread_parker/linux.rs
+++ b/core/src/thread_parker/linux.rs
@@ -6,6 +6,7 @@
// copied, modified, or distributed except according to those terms.
use libc;
+use std::ptr;
use std::sync::atomi... | 1 | 31 | 29 |
03529b3cb7028fcdba8d6930a8a7fd6f83b025dd | Linus Färnstrand | 2018-12-06T22:06:05 | Mark many Windows ThreadParker methods as safe | diff --git a/core/src/thread_parker/windows/keyed_event.rs b/core/src/thread_parker/windows/keyed_event.rs
index 0e32fce..8332941 100644
--- a/core/src/thread_parker/windows/keyed_event.rs
+++ b/core/src/thread_parker/windows/keyed_event.rs
@@ -94,11 +94,11 @@ impl KeyedEvent {
})
}
- pub unsafe fn p... | 3 | 35 | 35 |
10f61cf99629f261a52e0e10b9d2e113a2f4a7c0 | Linus Färnstrand | 2018-12-06T21:53:15 | Use AtomicPtr instead of AtomicUsize for pointers | diff --git a/core/src/thread_parker/windows/mod.rs b/core/src/thread_parker/windows/mod.rs
index a91ab61..3fa5994 100644
--- a/core/src/thread_parker/windows/mod.rs
+++ b/core/src/thread_parker/windows/mod.rs
@@ -5,7 +5,8 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modif... | 1 | 17 | 11 |
c139320d93bfd62aa39d937ce0147699fb905c6a | Linus Färnstrand | 2018-12-02T19:03:26 | Handle ThreadData safer by passing closure | diff --git a/core/src/word_lock.rs b/core/src/word_lock.rs
index 482ffa2..281cbfb 100644
--- a/core/src/word_lock.rs
+++ b/core/src/word_lock.rs
@@ -37,6 +37,7 @@ struct ThreadData {
impl ThreadData {
fn new() -> ThreadData {
+ assert!(mem::align_of::<ThreadData>() > !QUEUE_MASK);
ThreadData {
... | 1 | 45 | 35 |
19c2ae4908ab2e6f8f82c0a9129b623ffd3567fb | Linus Färnstrand | 2018-12-02T18:42:35 | Fix bug, reload state on each lock_slow loop | diff --git a/core/src/word_lock.rs b/core/src/word_lock.rs
index 81ae21e..482ffa2 100644
--- a/core/src/word_lock.rs
+++ b/core/src/word_lock.rs
@@ -170,7 +170,7 @@ impl WordLock {
// Loop back and try locking again
spinwait.reset();
- self.state.load(Ordering::Relaxed);
+ ... | 1 | 1 | 1 |
b92a1df9161102ce8e8996f6556895cd18076c00 | Linus Färnstrand | 2018-12-02T18:20:00 | Add warning about why unlock is unsafe | diff --git a/core/src/word_lock.rs b/core/src/word_lock.rs
index f719f27..81ae21e 100644
--- a/core/src/word_lock.rs
+++ b/core/src/word_lock.rs
@@ -103,6 +103,7 @@ impl WordLock {
self.lock_slow();
}
+ /// Must not be called on an already unlocked `WordLock`!
#[inline]
pub unsafe fn unlock... | 1 | 1 | 0 |
65d39478fe48f174ab68861e90f153020545c832 | Linus Färnstrand | 2018-12-02T17:16:33 | Mark WordLock::unlock_slow as not unsafe | diff --git a/core/src/word_lock.rs b/core/src/word_lock.rs
index 93258d4..f719f27 100644
--- a/core/src/word_lock.rs
+++ b/core/src/word_lock.rs
@@ -175,7 +175,7 @@ impl WordLock {
#[cold]
#[inline(never)]
- unsafe fn unlock_slow(&self) {
+ fn unlock_slow(&self) {
let mut state = self.state.l... | 1 | 17 | 9 |
a13aa0c3284ff0e3c42a783aceec29b61731ce40 | Linus Färnstrand | 2018-12-02T02:20:51 | Mark WordLock::lock as not unsafe | diff --git a/core/src/word_lock.rs b/core/src/word_lock.rs
index dde9614..93258d4 100644
--- a/core/src/word_lock.rs
+++ b/core/src/word_lock.rs
@@ -92,7 +92,7 @@ impl WordLock {
}
#[inline]
- pub unsafe fn lock(&self) {
+ pub fn lock(&self) {
if self
.state
.compare... | 1 | 4 | 4 |
b095b59ef6dbab6f3645c70338ae077c2fc9fb97 | Linus Färnstrand | 2018-12-02T17:04:53 | Make get_thread_data safe | diff --git a/core/src/word_lock.rs b/core/src/word_lock.rs
index 98338e1..dde9614 100644
--- a/core/src/word_lock.rs
+++ b/core/src/word_lock.rs
@@ -47,7 +47,7 @@ impl ThreadData {
}
// Returns a ThreadData structure for the current thread
-unsafe fn get_thread_data(local: &mut Option<ThreadData>) -> &ThreadData {
... | 1 | 2 | 2 |
661781807ebf5403092e56a67b5d35a4956a7c80 | Linus Färnstrand | 2018-12-02T01:02:28 | Move much bit manipulation out to trait | diff --git a/core/src/word_lock.rs b/core/src/word_lock.rs
index 7960568..98338e1 100644
--- a/core/src/word_lock.rs
+++ b/core/src/word_lock.rs
@@ -106,7 +106,7 @@ impl WordLock {
#[inline]
pub unsafe fn unlock(&self) {
let state = self.state.fetch_sub(LOCKED_BIT, Ordering::Release);
- if sta... | 1 | 38 | 9 |
961097d3fac84348ae88e5bdd3ba7ae79d908e51 | Linus Färnstrand | 2018-12-02T20:32:22 | Mark get_hashtable as not unsafe | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index c0ac731..4c34df8 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -194,7 +194,7 @@ impl Drop for ThreadData {
}
// Get a pointer to the latest hash table, creating one if it doesn't exist yet.
-unsafe fn get_hashtable() -> *mu... | 1 | 4 | 2 |
ca0267fc54b77f2ecbb116fe81ec363eb4240593 | Linus Färnstrand | 2018-12-02T20:23:05 | Store global HashTable as AtomicPtr<HashTable> instead of AtomicUsize | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index cb29749..c0ac731 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -12,7 +12,7 @@ use std::cell::{Cell, UnsafeCell};
#[cfg(not(has_localkey_try_with))]
use std::panic;
use std::ptr;
-use std::sync::atomic::{AtomicUsize, Ordering... | 1 | 20 | 15 |
dbdd9baf30a8ae756ee97719fbb40e36b35a56d8 | Linus Färnstrand | 2018-12-01T23:17:42 | Replace _padding with proper repr(align(x)) on newer Rust | diff --git a/core/build.rs b/core/build.rs
index 8d745ee..7cb883e 100644
--- a/core/build.rs
+++ b/core/build.rs
@@ -2,6 +2,9 @@ extern crate rustc_version;
use rustc_version::{version, Version};
fn main() {
+ if version().unwrap() >= Version::parse("1.25.0").unwrap() {
+ println!("cargo:rustc-cfg=has_rep... | 2 | 20 | 16 |
6421bbf344ca5727f27fce85203272474a59f0e8 | Amanieu d'Antras | 2018-11-25T15:48:48 | Use requeuing in CondVar::notify_one | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index 80b6d9c..64acaf9 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -471,6 +471,12 @@ pub enum RequeueOp {
/// Requeue all threads onto the target queue.
RequeueAll,
+
+ /// Unpark one thread and leave the rest parked... | 2 | 82 | 19 |
ddf9e08f89b8dfdbbf7a92b1bf2f6c9478d38340 | Thomas Schaller | 2018-11-20T20:10:31 | Bump core to 0.4, future-proof UnparkResult | diff --git a/Cargo.toml b/Cargo.toml
index e008586..33454f5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,7 +10,7 @@ keywords = ["mutex", "condvar", "rwlock", "once", "thread"]
categories = ["concurrency"]
[dependencies]
-parking_lot_core = { path = "core", version = "0.3" }
+parking_lot_core = { path = "core", v... | 3 | 5 | 2 |
b340d79f67c62beb201ce608da3466d6deff00e8 | Thomas Schaller | 2018-11-20T18:04:56 | Fix notify_all return and add tests | diff --git a/src/condvar.rs b/src/condvar.rs
index d5dcd0b..f60e178 100644
--- a/src/condvar.rs
+++ b/src/condvar.rs
@@ -221,7 +221,7 @@ impl Condvar {
};
let res = parking_lot_core::unpark_requeue(from, to, validate, callback);
- res.unparked_threads
+ res.unparked_thr... | 1 | 65 | 1 |
e4f7bb803b70f0375aa04d2ab62850bafce82765 | Thomas Schaller | 2018-11-20T18:04:29 | Add UnparkResult::requeued_threads | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index 528c15c..c5fad94 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -439,11 +439,14 @@ impl ParkResult {
}
/// Result of an unpark operation.
-#[derive(Copy, Clone, Eq, PartialEq, Debug)]
+#[derive(Copy, Clone, Default, Eq, Part... | 1 | 8 | 16 |
1ad3d60a18a310abe6f70a89d10d3d10061c864d | Thomas Schaller | 2018-11-20T17:18:03 | Return bool / usize from notify_one / notify_all
Add return value to both methods to indicate if
or how many threads were woken up. | diff --git a/src/condvar.rs b/src/condvar.rs
index 87d495c..d5dcd0b 100644
--- a/src/condvar.rs
+++ b/src/condvar.rs
@@ -107,24 +107,40 @@ impl Condvar {
/// Wakes up one blocked thread on this condvar.
///
+ /// Returns whether a thread was woken up.
+ ///
/// If there is a blocked thread on thi... | 1 | 34 | 10 |
2653619a613bc12dd6ab486f789d98956b65cdf0 | Amanieu d'Antras | 2018-11-18T21:39:26 | Bump lock_api version to 0.1.5 | diff --git a/lock_api/Cargo.toml b/lock_api/Cargo.toml
index b5a8ae6..d56978d 100644
--- a/lock_api/Cargo.toml
+++ b/lock_api/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "lock_api"
-version = "0.1.4"
+version = "0.1.5"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Wrappers to create fully-featur... | 1 | 1 | 1 |
e4c0e654d0f7891c315d27d6f758103595da5dc8 | Alex Gaynor | 2018-11-14T14:00:21 | Bumped rand dependency to 0.6 | diff --git a/Cargo.toml b/Cargo.toml
index 766f634..dcd42d0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,7 @@ parking_lot_core = { path = "core", version = "0.3" }
lock_api = { path = "lock_api", version = "0.1" }
[dev-dependencies]
-rand = "0.5"
+rand = "0.6"
[features]
default = ["owning_ref"]
diff -... | 2 | 2 | 2 |
224c24ef8ded141d9f5eb87adb44aa04951c027e | Bruce Mitchener | 2018-10-13T10:59:36 | Update to owning_ref 0.4 | diff --git a/lock_api/Cargo.toml b/lock_api/Cargo.toml
index 0a71400..b5a8ae6 100644
--- a/lock_api/Cargo.toml
+++ b/lock_api/Cargo.toml
@@ -10,7 +10,7 @@ categories = ["concurrency", "no-std"]
[dependencies]
scopeguard = { version = "0.3", default-features = false }
-owning_ref = { version = "0.3", optional = true... | 1 | 1 | 1 |
08cd5c7304cd81543e25ef0da15c919fc70a3a0e | Bruce Mitchener | 2018-10-13T10:45:13 | Fix typos. | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index 2d525a7..528c15c 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -1264,7 +1264,7 @@ mod deadlock_impl {
use self::WaitGraphNode::*;
- // Contrary to the _fast variant this locks the entrie table before looking for cyc... | 5 | 7 | 7 |
93bbd6979137da4e9060f4a0844e44d97d3eb3bd | Amanieu d'Antras | 2018-09-25T20:52:04 | Bump lock_api version to 0.1.4 | diff --git a/lock_api/Cargo.toml b/lock_api/Cargo.toml
index 4859dd2..0a71400 100644
--- a/lock_api/Cargo.toml
+++ b/lock_api/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "lock_api"
-version = "0.1.3"
+version = "0.1.4"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Wrappers to create fully-featur... | 1 | 1 | 1 |
e22891ac8054d0a4973a4a86f38e03e77aff5b47 | Amanieu d'Antras | 2018-09-25T20:49:24 | Add `try_map` for lock guards
Fixes #83 | diff --git a/lock_api/src/mutex.rs b/lock_api/src/mutex.rs
index f2b8389..b9cf49b 100644
--- a/lock_api/src/mutex.rs
+++ b/lock_api/src/mutex.rs
@@ -318,6 +318,33 @@ impl<'a, R: RawMutex + 'a, T: ?Sized + 'a> MutexGuard<'a, R, T> {
}
}
+ /// Attempts to make a new `MappedMutexGuard` for a component ... | 3 | 228 | 12 |
c6adf56cd9157f9ffb01f87e35311d1e63f3768b | Amanieu d'Antras | 2018-09-09T09:41:33 | Bump parking_lot_core to 0.3.1 | diff --git a/core/Cargo.toml b/core/Cargo.toml
index dc29c03..c5545e2 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "parking_lot_core"
-version = "0.3.0"
+version = "0.3.1"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "An advanced API for creating custom syn... | 1 | 1 | 1 |
0872527bcaba90c70af25b5a05d5f61c52752623 | Amanieu d'Antras | 2018-09-03T09:29:28 | Fix lock_api doctest
Fixes #91 | diff --git a/lock_api/src/lib.rs b/lock_api/src/lib.rs
index cb031b7..a68f887 100644
--- a/lock_api/src/lib.rs
+++ b/lock_api/src/lib.rs
@@ -27,7 +27,7 @@
//! # Example
//!
//! ```
-//! use lock_api::{RawMutex, Mutex};
+//! use lock_api::{RawMutex, Mutex, GuardSend};
//! use std::sync::atomic::{AtomicBool, Ordering... | 1 | 4 | 1 |
77564fdda3fcf7e062e3a6e01499733f2a7bf6d9 | Amanieu d'Antras | 2018-08-29T13:33:19 | Bump parking_lot version to 0.6.4 | diff --git a/Cargo.toml b/Cargo.toml
index ee56b88..766f634 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "parking_lot"
-version = "0.6.3"
+version = "0.6.4"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "More compact and efficient implementations of the standard synch... | 1 | 1 | 1 |
4b54cf86e1757060feaddb29920c09f2dd1e20fe | Amanieu d'Antras | 2018-08-29T13:33:05 | Bump parking_lot_core version to 0.3.0 | diff --git a/Cargo.toml b/Cargo.toml
index 491bbc1..ee56b88 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,7 +10,7 @@ keywords = ["mutex", "condvar", "rwlock", "once", "thread"]
categories = ["concurrency"]
[dependencies]
-parking_lot_core = { path = "core", version = "0.2" }
+parking_lot_core = { path = "core", v... | 2 | 2 | 2 |
fd287f4bbde28693406bf49f72d4be3dd6cece88 | Amanieu d'Antras | 2018-08-29T09:12:54 | Bump parking_lot_core version to 0.2.15 | diff --git a/core/Cargo.toml b/core/Cargo.toml
index 0a3e24f..37ff783 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "parking_lot_core"
-version = "0.2.14"
+version = "0.2.15"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "An advanced API for creating custom s... | 2 | 5 | 5 |
9b7a947f3856cb69b157ca4733233f3bfaed64be | Amanieu d'Antras | 2018-07-18T04:36:20 | Export RawMutex, RawRwLock and RawThreadId
Fixes #84 | diff --git a/src/condvar.rs b/src/condvar.rs
index f667bce..89ddac7 100644
--- a/src/condvar.rs
+++ b/src/condvar.rs
@@ -6,10 +6,10 @@
// copied, modified, or distributed except according to those terms.
use deadlock;
-use lock_api::RawMutex;
+use lock_api::RawMutex as RawMutexTrait;
use mutex::MutexGuard;
use pa... | 7 | 53 | 49 |
605885f9dfdcd90c535da00832daa68d742e66cc | Lukas Kalbertodt | 2018-07-11T08:45:12 | Escape [] in docs to avoid warnings on nightly
Before this commit, these `[Experimental]` parts of the documentation
were seen as intra-links. Those links could not been resolved, resulting
in a warning on nightly. | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index e4ad854..4bb8a37 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -1059,7 +1059,7 @@ unsafe fn unpark_filter_internal(
result
}
-/// [Experimental] Deadlock detection
+/// \[Experimental\] Deadlock detection
///
/// Enab... | 2 | 2 | 2 |
260192380fe4522b268a159843c8835265a110ce | Brian Gianforcaro | 2018-07-08T23:01:42 | Remove depreacted rand::weak_rng(), in favor of SmallRng
In https://github.com/rust-lang-nursery/rand/commit/1a4b3f753c41987e5077cadd5663758d56ffafd2
the weak_rng helper was deprecated, and SmallRng was
suggested to replace it instead. | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index bb07735..e4ad854 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -5,7 +5,8 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
-... | 1 | 4 | 3 |
67affb7a8211cff7eb6f8ab234f0aa0d96d5a719 | myfreeweb | 2018-06-18T17:44:41 | Enable lock_api/nightly feature from parking_lot/nightly | diff --git a/Cargo.toml b/Cargo.toml
index 9aa3175..12dbe96 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,7 +19,7 @@ rand = "0.5"
[features]
default = ["owning_ref"]
owning_ref = ["lock_api/owning_ref"]
-nightly = ["parking_lot_core/nightly"]
+nightly = ["parking_lot_core/nightly", "lock_api/nightly"]
deadlock_de... | 1 | 1 | 1 |
02ad761943e22d1a702aba99bbd33c9da6e036ae | Amanieu d'Antras | 2018-06-18T11:40:28 | Bump lock_api version to 0.1.3 | diff --git a/lock_api/Cargo.toml b/lock_api/Cargo.toml
index 5c0909c..4859dd2 100644
--- a/lock_api/Cargo.toml
+++ b/lock_api/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "lock_api"
-version = "0.1.2"
+version = "0.1.3"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Wrappers to create fully-featur... | 1 | 1 | 1 |
79f286213255a154c0d4f6f97dbefd6dd724b8e5 | Amanieu d'Antras | 2018-06-18T11:40:06 | Add test for clone and clean up docs | diff --git a/lock_api/src/mutex.rs b/lock_api/src/mutex.rs
index aa12ac7..f2b8389 100644
--- a/lock_api/src/mutex.rs
+++ b/lock_api/src/mutex.rs
@@ -352,8 +352,9 @@ impl<'a, R: RawMutexFair + 'a, T: ?Sized + 'a> MutexGuard<'a, R, T> {
mem::forget(s);
}
- /// Executes the given function with the mutex... | 2 | 11 | 2 |
f023ce82d49200a555d847279d3e22cd0f3401d0 | Amanieu d'Antras | 2018-06-18T11:39:25 | Revert "Make RwLockReadGuard clonable"
This reverts commit ff9a4203f2922b15543ec5466c235053d762efca.
This was a breaking change since guard.clone() behaves differently. | diff --git a/lock_api/src/rwlock.rs b/lock_api/src/rwlock.rs
index 34eef33..904ff95 100644
--- a/lock_api/src/rwlock.rs
+++ b/lock_api/src/rwlock.rs
@@ -792,17 +792,6 @@ impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> Drop for RwLockReadGuard<'a, R, T> {
}
}
-impl<'a, R: RawRwLockRecursive + 'a, T: ?Sized + 'a> Clo... | 2 | 1 | 25 |
8a3efac3c45f0ed13b8bf7add1ff963ee907b8ce | Amanieu d'Antras | 2018-06-18T00:05:02 | Bump lock_api version to 0.1.2 | diff --git a/lock_api/Cargo.toml b/lock_api/Cargo.toml
index 484660f..5c0909c 100644
--- a/lock_api/Cargo.toml
+++ b/lock_api/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "lock_api"
-version = "0.1.1"
+version = "0.1.2"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Wrappers to create fully-featur... | 1 | 1 | 1 |
49be99924b5365da245d8286730a6c9b31c416bd | Amanieu d'Antras | 2018-06-18T00:31:16 | Improve documentation for MutexGuard::unlocked() | diff --git a/lock_api/src/mutex.rs b/lock_api/src/mutex.rs
index b63cccf..aa12ac7 100644
--- a/lock_api/src/mutex.rs
+++ b/lock_api/src/mutex.rs
@@ -318,7 +318,7 @@ impl<'a, R: RawMutex + 'a, T: ?Sized + 'a> MutexGuard<'a, R, T> {
}
}
- /// Executes the given function with the mutex unlocked.
+ //... | 3 | 40 | 52 |
ff9a4203f2922b15543ec5466c235053d762efca | Amanieu d'Antras | 2018-06-18T00:04:11 | Make RwLockReadGuard clonable
Fixes #78 | diff --git a/lock_api/src/rwlock.rs b/lock_api/src/rwlock.rs
index 50a6a6f..32a22f7 100644
--- a/lock_api/src/rwlock.rs
+++ b/lock_api/src/rwlock.rs
@@ -789,6 +789,17 @@ impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> Drop for RwLockReadGuard<'a, R, T> {
}
}
+impl<'a, R: RawRwLockRecursive + 'a, T: ?Sized + 'a> Clo... | 2 | 25 | 1 |
0c3b67fc4da8d726abb157b808cb34ced840a79b | Amanieu d'Antras | 2018-06-08T00:41:54 | Add missing typedefs for mapped guards | diff --git a/src/lib.rs b/src/lib.rs
index d87f36f..686fcf8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -14,26 +14,29 @@
#![cfg_attr(feature = "nightly", feature(integer_atomics))]
#![cfg_attr(feature = "nightly", feature(asm))]
-extern crate parking_lot_core;
extern crate lock_api;
+extern crate parking_lot_core;... | 4 | 58 | 16 |
4630ac8a9c746b35531e50c6f4d07410bf299b5e | Amanieu d'Antras | 2018-06-05T13:49:41 | Add force_unlock methods to Mutex and RwLock | diff --git a/lock_api/src/mutex.rs b/lock_api/src/mutex.rs
index 13aa89c..d9b2c86 100644
--- a/lock_api/src/mutex.rs
+++ b/lock_api/src/mutex.rs
@@ -174,6 +174,22 @@ impl<R: RawMutex, T: ?Sized> Mutex<R, T> {
unsafe { &mut *self.data.get() }
}
+ /// Forcibly unlocks the mutex.
+ ///
+ /// This... | 3 | 136 | 0 |
b17ecbdb804c5d853ba1250c286fd39c9af061f5 | Amanieu d'Antras | 2018-06-05T07:31:40 | Rename parking_lot_wrappers to lock_api | diff --git a/Cargo.toml b/Cargo.toml
index 1298b50..d704faa 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,14 +12,14 @@ categories = ["concurrency"]
[dependencies]
parking_lot_core = { path = "core", version = "0.2" }
-parking_lot_wrappers = { path = "wrappers", version = "0.1" }
+lock_api = { path = "lock_api", v... | 13 | 28 | 28 |
d0433d83c7114ac6df49c3946cc0e207d09bc14a | Amanieu d'Antras | 2018-05-02T22:35:37 | Improve documentation of raw() | diff --git a/wrappers/src/mutex.rs b/wrappers/src/mutex.rs
index e07a3ed..48db961 100644
--- a/wrappers/src/mutex.rs
+++ b/wrappers/src/mutex.rs
@@ -176,6 +176,9 @@ impl<R: RawMutex, T: ?Sized> Mutex<R, T> {
/// Returns the underlying raw mutex object.
///
+ /// Note that you will most likely need to imp... | 3 | 10 | 0 |
dd970ed19b4ed7c3a282d54fb3282329271eb114 | Amanieu d'Antras | 2018-03-01T01:55:29 | Allow customizing whether lock guards are Send | diff --git a/src/raw_mutex.rs b/src/raw_mutex.rs
index bb0e3bc..fd87da9 100644
--- a/src/raw_mutex.rs
+++ b/src/raw_mutex.rs
@@ -19,7 +19,7 @@ type U8 = usize;
use std::time::{Duration, Instant};
use parking_lot_core::{self, ParkResult, SpinWait, UnparkResult, UnparkToken, DEFAULT_PARK_TOKEN};
use deadlock;
-use par... | 6 | 46 | 11 |
0edb590871cb20009d24ca057b1d3a527abad4b7 | Amanieu d'Antras | 2018-02-14T11:43:45 | Make MutexGuard::map sound by returning a separate type | diff --git a/src/condvar.rs b/src/condvar.rs
index 8f31feb..df3e542 100644
--- a/src/condvar.rs
+++ b/src/condvar.rs
@@ -217,7 +217,7 @@ impl Condvar {
/// with a different `Mutex` object.
#[inline]
pub fn wait<T: ?Sized>(&self, mutex_guard: &mut MutexGuard<T>) {
- self.wait_until_internal(unsafe ... | 4 | 546 | 239 |
f523aa38a5b5d1071227b1f9194d4bd5c7299d8a | Brian Campbell | 2018-06-07T19:39:53 | Add "concurrency" category to Cargo.toml
I was browsing [Crates.rs](https://crates.rs/index), an
alternative UI for crates.io, and expected to find parking_lot in
the "Concurrency" category, but I didn't since it looks like
parking_lot doesn't have any category set. Add a category to aid
with discoverability. | diff --git a/Cargo.toml b/Cargo.toml
index c2db108..beec8a2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -8,6 +8,7 @@ license = "Apache-2.0/MIT"
repository = "https://github.com/Amanieu/parking_lot"
readme = "README.md"
keywords = ["mutex", "condvar", "rwlock", "once", "thread"]
+categories = ["concurrency"]
[depe... | 2 | 2 | 0 |
532e55d8948044e9005a614ad548eb95659312a2 | Amanieu d'Antras | 2018-06-05T00:51:40 | Avoid deprecated API in tests | diff --git a/src/rwlock.rs b/src/rwlock.rs
index c2ddc11..eecf56f 100644
--- a/src/rwlock.rs
+++ b/src/rwlock.rs
@@ -1065,7 +1065,7 @@ mod tests {
thread::spawn(move || {
let mut rng = rand::thread_rng();
for _ in 0..M {
- if rng.gen_weighted_bool(N) {
+... | 1 | 1 | 1 |
2309ce4a25deaa240bfd2434148c4c4b0a72f669 | Amanieu d'Antras | 2018-06-05T00:02:19 | Fix compilation error on Linux with x32 ABI | diff --git a/core/src/thread_parker/unix.rs b/core/src/thread_parker/unix.rs
index a9e7600..c15f947 100644
--- a/core/src/thread_parker/unix.rs
+++ b/core/src/thread_parker/unix.rs
@@ -12,6 +12,15 @@ use std::mem;
#[cfg(any(target_os = "macos", target_os = "ios"))]
use std::ptr;
+// x32 Linux uses a non-standard ty... | 1 | 11 | 2 |
d66d8b97523d19160715192f38cf5a4c9dbd22d4 | Ryan Leckey | 2018-06-01T17:45:27 | Upgrade rand 0.4 -> 0.5 | diff --git a/Cargo.toml b/Cargo.toml
index affc5b5..c2db108 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,7 @@ parking_lot_core = { path = "core", version = "0.2" }
owning_ref = { version = "0.3", optional = true }
[dev-dependencies]
-rand = "0.4"
+rand = "0.5"
[features]
default = ["owning_ref"] | 1 | 1 | 1 |
56f1c89a1decf5f385280b0c288f719bba83f144 | Amanieu d'Antras | 2018-04-27T03:40:25 | Bump parking_lot version to 0.5.5 | diff --git a/Cargo.toml b/Cargo.toml
index 19734dd..affc5b5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "parking_lot"
-version = "0.5.4"
+version = "0.5.5"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "More compact and efficient implementations of the standard synch... | 1 | 1 | 1 |
59c36efb91c01648bb0cbc0ccc6c57b503fc38bf | Amanieu d'Antras | 2018-04-27T03:39:05 | Bump parking_lot_core version to 0.2.14 | diff --git a/core/Cargo.toml b/core/Cargo.toml
index 5dab07e..53e86c7 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "parking_lot_core"
-version = "0.2.13"
+version = "0.2.14"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "An advanced API for creating custom s... | 1 | 1 | 1 |
e92e1db5849276a45c5f2180566aa7d8f55f91df | Amanieu d'Antras | 2018-04-27T03:17:11 | Fix a warning on nightly | diff --git a/core/src/thread_parker/linux.rs b/core/src/thread_parker/linux.rs
index 693125e..aee380d 100644
--- a/core/src/thread_parker/linux.rs
+++ b/core/src/thread_parker/linux.rs
@@ -16,8 +16,10 @@ const FUTEX_PRIVATE: i32 = 128;
// x32 Linux uses a non-standard type for tv_nsec in timespec.
// See https://sour... | 1 | 2 | 0 |
3fecbdfeceeea6446ec178e7cfa03cecb2f7b1ae | Alex Crichton | 2018-04-27T01:08:03 | Remove dependency on the `synchapi` winapi feature
Pulling in `parking_lot` to the Rust compiler unfortunately had adverse side
effects on the binary dependencies of rustc -- rust-lang/rust#49438. It turns
out this is due to a number of bugs happening all at once, and currently we're
looking for ways to fix the beta/m... | diff --git a/core/Cargo.toml b/core/Cargo.toml
index 2341667..5dab07e 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -20,7 +20,7 @@ libc = "0.2.27"
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3", features = ["winnt", "ntstatus", "minwindef",
- "winerror", "winbase", "synchapi", "errhandli... | 2 | 18 | 2 |
5bbf7db11559410e7bb6d1de802e312f9c5157f8 | Amanieu d'Antras | 2018-04-23T05:47:54 | Remove unused nightly features in parking_lot_core | diff --git a/core/src/lib.rs b/core/src/lib.rs
index 580f35d..4bf6414 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -38,9 +38,7 @@
//! reference count and the two mutex bits in the same atomic word.
#![warn(missing_docs)]
-#![cfg_attr(feature = "nightly", feature(const_fn, thread_local_state))]
#![cfg_attr... | 2 | 0 | 10 |
192604c12215fed2d0a7b24f0b565fd72e856446 | Val Markovic | 2018-04-23T04:22:11 | Benchmark threads now wait on barrier to start
Without this, some threads start earlier than others which skews the results
because there's no contention (other threads haven't started). | diff --git a/benchmark/src/mutex.rs b/benchmark/src/mutex.rs
index 50b9203..916a68c 100644
--- a/benchmark/src/mutex.rs
+++ b/benchmark/src/mutex.rs
@@ -12,7 +12,7 @@ mod args;
use args::ArgRange;
use std::thread;
-use std::sync::Arc;
+use std::sync::{Arc, Barrier};
use std::sync::atomic::{AtomicBool, Ordering};
... | 2 | 11 | 2 |
430c36846d031a43b798b666695b8cdef058ac0a | debris | 2018-04-13T09:31:35 | implement fmt::Debug for Condvar - closes #64, use .pad function instead of write! macro | diff --git a/src/condvar.rs b/src/condvar.rs
index d6efab3..902bc05 100644
--- a/src/condvar.rs
+++ b/src/condvar.rs
@@ -7,7 +7,7 @@
use std::sync::atomic::{AtomicPtr, Ordering};
use std::time::{Duration, Instant};
-use std::ptr;
+use std::{ptr, fmt};
use parking_lot_core::{self, ParkResult, RequeueOp, UnparkResul... | 4 | 16 | 4 |
f85a6e85d27d8bf802367389494b3af7b4b7dda7 | debris | 2018-04-12T14:23:43 | use std::fmt::DebugStruct to format debug output | diff --git a/src/mutex.rs b/src/mutex.rs
index 6ed176d..e187da5 100644
--- a/src/mutex.rs
+++ b/src/mutex.rs
@@ -278,7 +278,9 @@ impl<T: ?Sized + Default> Default for Mutex<T> {
impl<T: ?Sized + fmt::Debug> fmt::Debug for Mutex<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self.try_lo... | 4 | 73 | 4 |
5c8ed6d37c5e7355909274f96b9a3824c4d8f8f2 | Amanieu d'Antras | 2018-02-20T15:54:21 | Bump parking_lot version to 0.5.4 | diff --git a/Cargo.toml b/Cargo.toml
index ff71891..19734dd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "parking_lot"
-version = "0.5.3"
+version = "0.5.4"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "More compact and efficient implementations of the standard synch... | 1 | 1 | 1 |
ebde781c492ee3aab67378ff3a7197b1a7e312c4 | John Paul Adrian Glaubitz | 2018-02-20T07:43:11 | Provide correct implementation of AtomicElisionExt for x32 | diff --git a/src/elision.rs b/src/elision.rs
index 49213e3..23895b1 100644
--- a/src/elision.rs
+++ b/src/elision.rs
@@ -90,7 +90,46 @@ impl AtomicElisionExt for AtomicUsize {
}
}
-#[cfg(all(feature = "nightly", target_arch = "x86_64"))]
+#[cfg(all(feature = "nightly", target_arch = "x86_64", target_pointer_wid... | 1 | 40 | 1 |
426be217e31036370faf89b1bafa63cd01e859e5 | Amanieu d'Antras | 2018-02-20T00:47:48 | Bump parking_lot_core version to 0.2.13 | diff --git a/core/Cargo.toml b/core/Cargo.toml
index 969bb9e..2341667 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "parking_lot_core"
-version = "0.2.12"
+version = "0.2.13"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "An advanced API for creating custom s... | 1 | 1 | 1 |
92586a1ebbc3f55156272b3930e5e98be06118f0 | Amanieu d'Antras | 2018-02-20T00:47:24 | Fix compilation on x32 | diff --git a/core/src/thread_parker/linux.rs b/core/src/thread_parker/linux.rs
index 8ae5eaf..693125e 100644
--- a/core/src/thread_parker/linux.rs
+++ b/core/src/thread_parker/linux.rs
@@ -16,7 +16,7 @@ const FUTEX_PRIVATE: i32 = 128;
// x32 Linux uses a non-standard type for tv_nsec in timespec.
// See https://sourc... | 1 | 1 | 1 |
790330d64e7967fdcc732ce81b97e5717f0e6b40 | Amanieu d'Antras | 2018-02-20T00:45:01 | Bump parking_lot_core version to 0.2.12 | diff --git a/core/Cargo.toml b/core/Cargo.toml
index 94950b0..969bb9e 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "parking_lot_core"
-version = "0.2.11"
+version = "0.2.12"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "An advanced API for creating custom s... | 1 | 1 | 1 |
071136e9824e1e3268ac0de51a9c1b1f3a77c241 | Amanieu d'Antras | 2018-02-20T00:43:11 | Fix compilation issue on x32 Linux (wrong type for tv_nsec)
Fixes #62 | diff --git a/core/src/thread_parker/linux.rs b/core/src/thread_parker/linux.rs
index a047afd..8ae5eaf 100644
--- a/core/src/thread_parker/linux.rs
+++ b/core/src/thread_parker/linux.rs
@@ -13,6 +13,13 @@ const FUTEX_WAIT: i32 = 0;
const FUTEX_WAKE: i32 = 1;
const FUTEX_PRIVATE: i32 = 128;
+// x32 Linux uses a non-s... | 1 | 8 | 1 |
be44c366ae2f79a565bdc0366a02e3c095bc69d5 | Kartikaya Gupta | 2018-02-16T17:35:03 | Bump minimum libc version requirement
In versions of libc prior to 0.2.27, libc::SYS_futex did
not exist. This is required by parking_lot_core when building
with the nightly feature enabled, like so:
cargo +nightly build --features nightly
This patch bumps the minimum acceptable libc version so that
compiles unde... | diff --git a/core/Cargo.toml b/core/Cargo.toml
index 43ab4a7..94950b0 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -16,7 +16,7 @@ thread-id = { version = "3.2.0", optional = true }
backtrace = { version = "0.3.2", optional = true }
[target.'cfg(unix)'.dependencies]
-libc = "0.2.15"
+libc = "0.2.27"
[tar... | 1 | 1 | 1 |
6cb888ca49c305f460e6ef69284ecd33c920ea23 | Amanieu d'Antras | 2018-02-11T12:09:19 | Bump parking_lot_core version to 0.2.11 | diff --git a/core/Cargo.toml b/core/Cargo.toml
index 34dd54b..43ab4a7 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "parking_lot_core"
-version = "0.2.10"
+version = "0.2.11"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "An advanced API for creating custom s... | 1 | 1 | 1 |
3370e3e4833fe1ee55636c2d79f0e4dd010058c4 | Amanieu d'Antras | 2018-02-11T12:08:17 | Fix prototype for NtCreateKeyedEvent
Fixes #59 | diff --git a/core/src/thread_parker/windows/keyed_event.rs b/core/src/thread_parker/windows/keyed_event.rs
index 80fd1ad..599d66f 100644
--- a/core/src/thread_parker/windows/keyed_event.rs
+++ b/core/src/thread_parker/windows/keyed_event.rs
@@ -16,7 +16,7 @@ use winapi::shared::ntstatus::{STATUS_SUCCESS, STATUS_TIMEOUT... | 1 | 3 | 3 |
e3fbfdf7ed3619903eabe8145fd6017e8f45d8fb | Lakelezz | 2018-02-07T21:30:30 | Add `?Sized` on `Send`- and `Sync`-impl for `ReentrantMutex`. | diff --git a/src/remutex.rs b/src/remutex.rs
index c43c74b..d11533e 100644
--- a/src/remutex.rs
+++ b/src/remutex.rs
@@ -33,8 +33,8 @@ pub struct ReentrantMutex<T: ?Sized> {
data: UnsafeCell<T>,
}
-unsafe impl<T: Send> Send for ReentrantMutex<T> {}
-unsafe impl<T: Send> Sync for ReentrantMutex<T> {}
+unsafe imp... | 1 | 2 | 2 |
870110cafd149ef9969e04f1ac9ba844e32adf80 | Lakelezz | 2018-02-07T17:21:03 | Add `?Sized` on `Send`- and `Sync`-impl for `Mutex`. | diff --git a/src/mutex.rs b/src/mutex.rs
index f7a8b81..6ed176d 100644
--- a/src/mutex.rs
+++ b/src/mutex.rs
@@ -98,8 +98,8 @@ pub struct Mutex<T: ?Sized> {
data: UnsafeCell<T>,
}
-unsafe impl<T: Send> Send for Mutex<T> {}
-unsafe impl<T: Send> Sync for Mutex<T> {}
+unsafe impl<T: ?Sized + Send> Send for Mutex<... | 1 | 2 | 2 |
3b940b5303c1282356dd40ae6dc2588f292e20fb | messense | 2018-01-31T05:44:23 | Upgrade to rand 0.4 | diff --git a/Cargo.toml b/Cargo.toml
index d2f93e6..ff71891 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,7 @@ parking_lot_core = { path = "core", version = "0.2" }
owning_ref = { version = "0.3", optional = true }
[dev-dependencies]
-rand = "0.3"
+rand = "0.4"
[features]
default = ["owning_ref"]
diff -... | 2 | 2 | 2 |
03ad65df95260c142f3f9eb261cbed7d786ea210 | Amanieu d'Antras | 2018-01-23T10:12:04 | Simply emulation layer for stable Rust | diff --git a/core/src/lib.rs b/core/src/lib.rs
index d80150f..580f35d 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -71,9 +71,6 @@ mod thread_parker;
#[path = "thread_parker/generic.rs"]
mod thread_parker;
-#[cfg(not(feature = "nightly"))]
-mod stable;
-
mod util;
mod spinwait;
mod word_lock;
diff --git ... | 13 | 14 | 209 |
600b02a0acdda1a30d7ee8dca7ec1a51963894fc | Amanieu d'Antras | 2018-01-06T17:33:19 | Bump parking_lot_core version to 0.2.10 | diff --git a/core/Cargo.toml b/core/Cargo.toml
index 9e55f2b..811a54f 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "parking_lot_core"
-version = "0.2.9"
+version = "0.2.10"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "An advanced API for creating custom sy... | 1 | 1 | 1 |
ff764afd5b9b877046c455baa1e8b6cc81f48739 | Bastien Orivel | 2018-01-06T15:58:31 | Bump winapi to 0.3 | diff --git a/core/Cargo.toml b/core/Cargo.toml
index ba08196..9e55f2b 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -19,8 +19,8 @@ backtrace = { version = "0.3.2", optional = true }
libc = "0.2.15"
[target.'cfg(windows)'.dependencies]
-winapi = "0.2"
-kernel32-sys = "0.2"
+winapi = { version = "0.3", featur... | 5 | 89 | 77 |
54d79fa5e7f3b894f7fcb9be4a336aa5e4e26dcd | Malo Jaffré | 2017-12-29T12:10:39 | Bump parking_lot_core to 0.2.9 | diff --git a/core/Cargo.toml b/core/Cargo.toml
index 6480ade..ba08196 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "parking_lot_core"
-version = "0.2.8"
+version = "0.2.9"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "An advanced API for creating custom syn... | 1 | 1 | 1 |
5b87185c34c3349dfa55512a9e9f2bc24494d943 | Malo Jaffré | 2017-12-29T12:10:22 | Add an explicit type to silence a future compatibility warning
requeue_threads` now requires an explicit type because of the `is_null`
method call later in the code.
See rust-lang/rust#46906 | diff --git a/core/src/parking_lot.rs b/core/src/parking_lot.rs
index cce70c1..5065bb7 100644
--- a/core/src/parking_lot.rs
+++ b/core/src/parking_lot.rs
@@ -890,7 +890,7 @@ unsafe fn unpark_requeue_internal(
let mut link = &bucket_from.queue_head;
let mut current = bucket_from.queue_head.get();
let mut p... | 1 | 1 | 1 |
fa6e0b4a56493ad65456b8d5daca3c731bdfe47b | Malo Jaffré | 2017-12-29T12:06:19 | Fix pulldown migration warnings in parking_lot_core
Lists now require an empty line before them, and a link can no longer be
split on multiple lines.
See rust-lang/rust#44229. | diff --git a/core/src/lib.rs b/core/src/lib.rs
index 0ae6b8e..4197e09 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -11,15 +11,16 @@
//! # The parking lot
//!
//! To keep synchronization primitives small, all thread queuing and suspending
-//! functionality is offloaded to the *parking lot*. The idea behind ... | 1 | 8 | 7 |
9e20fec6b93145ffd40189be659563afaf6ebdd9 | Amanieu d'Antras | 2017-12-16T13:27:47 | Bump parking_lot_core version to 0.2.8 | diff --git a/core/Cargo.toml b/core/Cargo.toml
index 1616ffc..6480ade 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "parking_lot_core"
-version = "0.2.7"
+version = "0.2.8"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "An advanced API for creating custom syn... | 1 | 1 | 1 |
c7233a99ef27fb2779f0de3bea5dbbf075dd4cf2 | Amanieu d'Antras | 2017-12-16T13:26:58 | Use libc::SYS_futex instead of our own definition | diff --git a/core/src/thread_parker/linux.rs b/core/src/thread_parker/linux.rs
index e3088b7..ff159c4 100644
--- a/core/src/thread_parker/linux.rs
+++ b/core/src/thread_parker/linux.rs
@@ -9,15 +9,6 @@ use std::sync::atomic::{AtomicI32, Ordering};
use std::time::Instant;
use libc;
-#[cfg(target_arch = "x86")]
-cons... | 1 | 3 | 12 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.