41 Commits

Author SHA1 Message Date
Riley Williams
ab441e9425 Apply clippy fixes 2025-07-15 10:07:26 -04:00
Markus Reiter
0c1e1c0d0e
Don't deny warnings. 2025-04-26 20:41:48 +02:00
Christian Poveda
b6d10f62fe
Remove Q* type aliases for MpMcQueue, and rename it to just Queue 2025-04-10 15:54:12 -05:00
Christian Poveda
739dbc4c3c
Fix clippy::semicolon_if_nothing_returned warnings 2025-03-25 14:36:44 -05:00
YuhanLiin
79c50cfdd3 Fix tsan CI errors 2024-01-14 15:26:32 -08:00
Alex Martens
168c19857e Run clippy on tests 2023-11-17 09:24:30 -08:00
Alex Martens
d7306dbbd2 Fix clippy lints 2023-11-15 13:20:54 -08:00
Dario Nieuwenhuis
24bfda59cb thread scopes are stable now. 2023-10-21 00:00:21 +02:00
Jorge Aparicio
b7942b9c3b remove pool tsan test
tsan does not support the 32-bit x86 targets
2022-10-18 11:43:51 +02:00
Jorge Aparicio
d9e620036b remove the scoped_threads feature gate
the feature has been stabilized in a recent nightly
2022-06-15 13:11:48 +02:00
Jorge Aparicio
1e1d801b07 fix typo 2022-04-29 15:29:15 +02:00
Jorge Aparicio
3d3277f6d3 only build tests that require thread::scope on nightly 2022-04-29 15:21:58 +02:00
Jorge Aparicio
477c53b25d use std:🧵:scope instead of scoped_threadpool
as it's easier to deal with TSAN false positives in the former API

as surfaced in PR 280 the current supression rules don't handle newer versions of the
scoped_threadpool crate

trying to update the supression rules related to scoped_threadpool in PR #282 revealed that the
supression rules are masking (hiding) real data races:
https://github.com/japaric/heapless/pull/282#issuecomment-1113173358

std:🧵:scope requires less supression rules and does not mask real data races -- for instance,
the data race in the linked issue comment is not masked when using std:🧵:scope

tradeoffs:
- pro: one less dev dependency
- pro: supressions file is simpler
- cons: std:🧵:scope is only available on recent nightlies
2022-04-29 15:20:55 +02:00
Dario Nieuwenhuis
4c203532ba Ignore slow tests when running in miri.
There's a few tests that do millions of iterations. Miri is incredibly
slow and takes too long to run these (I gave up waiting after 5+ minutes),
so we ignore them when testing with miri.
2021-09-13 01:22:38 +02:00
Emil Fresk
241085e970 Fixed MPMC panic on wrapping sub 2021-04-22 20:00:30 +02:00
Emil Fresk
6fdcc4fb99 New SPSC queue, now safe and much simpler
This commit implements a new, simplified, SPSC that does not have the
reported issues (e.g. not properly wrapping the indexes for non
powers-of-2), and the support for multiple different index sizes has
been removed for simplicity.
2021-04-18 19:18:56 +02:00
Emil Fresk
870a925229 Removed SingeCore and MultiCore, relies on atomics now 2021-04-01 21:07:05 +02:00
Roman Proskuryakov
92cc062a4c Fix cargo test without cargo features enabled 2021-03-28 10:22:22 +03:00
Roman Proskuryakov
f7cb3e575f Fix fmt 2021-03-28 09:48:34 +03:00
Emil Fresk
8ba71d4b14 Merge branch 'master' into const_generics 2021-03-25 17:45:10 +01:00
Per Lindgren
f962e3a45f Initial conversion to const generics
vec passes tests

vec passes tests with docs as well (besides one with FromIter)

vec passes tests with docs as well (besides one with FromIter)

exposing full API

passing all current tests

starting with string

string test passes mostly

string test passes

ufmt passes

TODO removed

binary_heap wip

binary_heap passes tests

sealed passes

spsc wip

spsc wip2

split wip3

spcs and split passes --lib tests

spcs and split passes --lib tests

spcs and split passes --lib tests

spcs and split passes all tests (doc + lib)

indexmap wip

indexmap passes --lib test

indexmap passes all tests (lib + doc)

indexset passes all tests (lib + doc)

indexset passes all tests (lib + doc)

linear map wip

linear map all test (lib + doc) passes, drop not tested, into_iter(mut self) not implemented

history buffer all test pass (doc + lib), Copy instead of clone atm

serde does not work

pool works, serde still not

serde wip

serde wip

serde wip

serde wip
2021-03-25 16:31:58 +01:00
Jorge Aparicio
e4580da8a8 x86_64: "practically" thread-safe Pool 2021-03-25 16:30:45 +01:00
Jorge Aparicio
e4c8f1f75b x86_64: "practically" thread-safe Pool 2020-05-03 17:18:11 +02:00
Jorge Aparicio
94db64d8a6 add multiple-producer multiple-consumer lock-free queue 2019-05-22 18:58:58 +02:00
Jorge Aparicio
fc4054571f drop const-fn feature; provide const constructors on near stable (1.36) 2019-05-06 17:13:15 +02:00
Jorge Aparicio
f83329cbf4 rename RingBuffer to spsc::Queue 2018-10-19 19:28:57 +02:00
Felix Stegmaier
40133fea0f Merge remote-tracking branch 'origin/master' into const-fn-feature 2018-07-13 11:25:56 +02:00
Reece Stevens
84ce6ec159 Perform same len fix for iterators 2018-06-19 23:29:14 -05:00
Reece Stevens
0172082262 Fix len miscalculation when head > tail 2018-06-19 23:21:14 -05:00
Felix Stegmaier
e48b15474d Update docs and tests 2018-05-21 13:18:28 +02:00
Felix Stegmaier
479c74d9e5 Fix static variables in tests 2018-05-19 18:32:47 +02:00
Felix Stegmaier
512ce719ed Fix missing_docs in const_fn macro 2018-05-19 12:25:30 +02:00
Jorge Aparicio
c1892739f7 drop untagged-option dependency, and depend on generic-array 2018-04-22 00:41:13 +02:00
Jorge Aparicio
2fdb766d27 add Consumer.dequeue_unchecked and Producer.enqueue_unchecked 2018-04-20 03:40:32 +02:00
Jorge Aparicio
534aad044c cargo fmt 2018-03-01 20:30:50 +01:00
Vadzim Dambrouski
e5e24f0844 What if tsan is right? 2017-11-09 22:04:17 +03:00
Jorge Aparicio
40994962e2 add contention test 2017-11-09 15:33:54 +01:00
Jorge Aparicio
30ea33c349 relax the lifetime constraint of RingBuffer.split
also

- add a "`split` freezes the ring buffer" compile fail test
- hide compile-fail doc tests
- add scoped threads tests
2017-11-09 02:27:01 +01:00
Jorge Aparicio
731e8ae150 rewrite the test for less unsafety 2017-11-09 02:09:38 +01:00
Jorge Aparicio
9533e27f44 test two consecutive operations 2017-11-08 22:51:55 +01:00
Jorge Aparicio
4a6bf95f19 add tsan test 2017-10-31 21:30:43 +01:00