-
Notifications
You must be signed in to change notification settings - Fork 792
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
Fix synchronization of datetime tests #867
Conversation
tests/test_datetime.rs
Outdated
}; | ||
} | ||
// TODO(kngwyu): Remove this variable | ||
const MUTEX: RawMutex = RawMutex::INIT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a const
is actually not a real variable until the location it's used, so this still creates multiple copies of the mutex.
I think that the suggestion to use static
on Travis is correct, as then there will only be one shared mutex:
const MUTEX: RawMutex = RawMutex::INIT; | |
static Mutex: RawMutex = RawMutex::INIT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, thank you.
e70ed61
to
145b917
Compare
Looks like something weird has happened to travis again. I wonder if we should be migrating to github actions to simplify the CI? |
No worry, it was because of a bug. |
As reported by @programmerjake by this comment, the
lock!
macro used in the datetime tests doesn't work.This PR
and
nighly
feature from parking_lot@davidhewitt
I'm sorry that this PR conflicts with #866. I wanted to fix my fault myself.