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

Remove the single_threaded/multi_threaded feature flags #1390

Merged
merged 2 commits into from Mar 21, 2022

Conversation

emilk
Copy link
Owner

@emilk emilk commented Mar 20, 2022

Always use parking_lot for mutexes, i.e. always be multi-threaded.

Closes #1379

Please take a look @DusterTheFirst

cargo bench shows no difference, so at this point I see no real reason of keeping the single_threaded path.

There is an alternative solution (which is orthogonal to this one):

which has the advantage of not triggering the problem caught in #1380

Always use parking_lot for mutexes, i.e. always be multi-threaded.

Closes #1379

An alternative to #1389
@emilk emilk marked this pull request as ready for review March 21, 2022 15:53
@DusterTheFirst
Copy link
Contributor

DusterTheFirst commented Mar 21, 2022

This looks to be a better solution since it un-complicates the single/multi-threaded feature situation while at the same time avoiding the performance cost sen in #1389.

I do like the switch to atomics for handling request_redraw, avoiding the need for a lock, seen in #1389. This change may be worth adopting in this PR as well.

To address #1380, this PR could be paired with the change you mentioned in your comment (#1380 (comment)).

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.

Changes to the repaint signal causes problems with multi-threaded code
2 participants