Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(mpsc): remove panics from wait queue #50

Merged
merged 2 commits into from
Mar 16, 2022
Merged

perf(mpsc): remove panics from wait queue #50

merged 2 commits into from
Mar 16, 2022

Conversation

hawkw
Copy link
Owner

@hawkw hawkw commented Mar 16, 2022

The wait queue should never panic in release mode.

Signed-off-by: Eliza Weisman [email protected]

The wait queue should never panic in release mode.

Signed-off-by: Eliza Weisman <[email protected]>
@hawkw hawkw enabled auto-merge (squash) March 16, 2022 17:26
@hawkw hawkw merged commit f61993f into main Mar 16, 2022
@hawkw hawkw deleted the eliza/dont-panic branch March 16, 2022 18:52
hawkw added a commit that referenced this pull request Mar 16, 2022
When indices are returned by the `Core::idx_gen` function, we can assume
that they are in bounds, since any bits that would make the index out of
bounds for the core's array size are masked out. Therefore, we can
safely use `slice::get_unchecked` to elide bounds checks.

In debug mode, we assert that the index is in bounds, just in case
there's a bug somewhere.

In conjunction with #50, this means MPSCs should never panic in release
mode.

Signed-off-by: Eliza Weisman <[email protected]>
hawkw added a commit that referenced this pull request Mar 16, 2022
<a name="v0.1.1"></a>
### v0.1.1 (2022-03-16)

#### Performance

*   elide bounds checks when indexing (#51)
    ([27ea0ec](27ea0ec))
* **mpsc:**  remove panics from wait queue (#50)
  ([f61993f](f61993f))

#### Bug Fixes

* **mpsc:**  compilation error on macOS (#53)
  ([d0d0cd9](d0d0cd9),
  closes [#54](#54))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant