Conversation
…_ref`) to this slot to be dropped. Add ability to `Core::push_ref` to skip such slots and attempt to reuse them on the next lap.
faddeb7 to
ad96a30
Compare
|
Hi @hawkw. I created this PR following your suggestions in #80 (to have both implementations available at the same time). If you prefer the approach from this PR, I can merge and stash/rebase all changes back into #80. Also, I rented a |
hawkw
left a comment
There was a problem hiding this comment.
Overall, I definitely prefer this approach over the one proposed in #80. I had a handful of minor suggestions, most of which are just stylistic --- feel free to ignore most of them.
I do think we should ensure the new slow loom models are added to the list of slow models that run in separate CI jobs, so that we can run those tests on CI in the future.
b297517 to
885f4cc
Compare
|
Hello @hawkw, I hope you're well. I wanted to kindly bring to your attention this PR. Could you please finish reviewing it when you have a moment. Thank you. |
|
Hi, I'm sorry, I must have missed this earlier! I'd love to get this PR merged soon and I'll give it another review shortly. |
| #[inline] | ||
| fn check_has_reader(state: usize) -> bool { | ||
| state & HAS_READER == HAS_READER | ||
| } | ||
|
|
||
| #[inline] | ||
| fn set_has_reader(state: usize) -> usize { | ||
| state | HAS_READER | ||
| } | ||
|
|
||
| #[inline] | ||
| fn clear_has_reader(state: usize) -> usize { | ||
| state & !HAS_READER | ||
| } | ||
|
|
||
| #[inline] | ||
| fn wrapping_add(a: usize, b: usize) -> usize { | ||
| (a + b) & MAX_CAPACITY | ||
| } |
There was a problem hiding this comment.
There are now enough operations on state that I wonder if it's worth turning it into a newtype...but, we can do that in a separate PR.
## v0.1.5 (2024-04-06) #### Features * **mpsc:** add `len`, `capacity`, and `remaining` methods to mpsc (#72) ([00213c1](00213c1), closes [#71](#71)) #### Bug Fixes * unused import with `alloc` enabled ([ac1eafc](ac1eafc)) * skip slots with active reading `Ref`s in `push_ref` (#81) ([a72a286](a72a286), closes [#83](#83), [#80](#80))
No description provided.