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

Why Task::bool is AtomicBool? #4

Closed
TennyZhuang opened this issue Oct 27, 2021 · 1 comment · Fixed by #5
Closed

Why Task::bool is AtomicBool? #4

TennyZhuang opened this issue Oct 27, 2021 · 1 comment · Fixed by #5

Comments

@TennyZhuang
Copy link

It was never been modified after constructed.

@mgattozzi
Copy link
Owner

I think in previous iterations of the code I had used it in a way that needed Send/Sync, but with a quick modification it seem that's not the case now and that Arc handles that problem. I can switch it to a bool now and get rid of the things depending on that! Thanks :D

mgattozzi added a commit that referenced this issue Oct 27, 2021
In previous iterations of whorl we needed an AtomicBool, but since we
wrap a Task in an Arc we don't actually need it since we never change
the value either. The Task either blocks or does not and that does not
change at all. We change to a normal bool and remove any phrasing
related to it being an AtomicBool.

Closes #4
mgattozzi added a commit that referenced this issue Oct 27, 2021
In previous iterations of whorl we needed an AtomicBool, but since we
wrap a Task in an Arc we don't actually need it since we never change
the value either. The Task either blocks or does not and that does not
change at all. We change to a normal bool and remove any phrasing
related to it being an AtomicBool.

Closes #4
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 a pull request may close this issue.

2 participants