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

change DYNAMIC_THREAD_COUNT to be an AtomicUsize #451

Closed
wants to merge 9 commits into from
Closed

change DYNAMIC_THREAD_COUNT to be an AtomicUsize #451

wants to merge 9 commits into from

Conversation

kolapapa
Copy link

@kolapapa kolapapa commented Nov 4, 2019


impl TaskId {
/// Generates a new `TaskId`.
pub(crate) fn generate() -> TaskId {
static COUNTER: AtomicU64 = AtomicU64::new(1);
static COUNTER: AtomicUsize = AtomicUsize::new(1);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should still be an AtomicU64, I'm afraid. What we can do is use AtomicCell<u64> from crossbeam-utils.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed it as you suggest

@kolapapa
Copy link
Author

kolapapa commented Nov 8, 2019

#286 Is this PR ready to merge? Then I'll close this~It looks better

@yoshuawuyts
Copy link
Contributor

@kolapapa it seems this PR has merge conflicts with master. Could this perhaps be rebased? Thanks!

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.

None yet

2 participants