-
-
Couldn't load subscription status.
- Fork 115
Add threadid() and nthreads()
#240
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
Conversation
src/Compat.jl
Outdated
| end | ||
| export @threads | ||
| const threadid() = 1 | ||
| const nthreads() = 1 |
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.
No const
test/runtests.jl
Outdated
| end | ||
|
|
||
| # Issue #223 | ||
| if VERSION < v"0.5" |
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.
Fwiw this condition is always true even on master.
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.
Yeah, I'll change this to VERSION < v"0.5.0"
|
Maybe aa well just relax the test |
|
@yuyichao You meant not have the test? Because in v0.5, you can start Julia with more than one thread. Then Compat tests would fail. |
|
No i mean sth like just making sure both exist and 0 < id < n |
|
Umm, but what would |
|
n was short for |
|
Also, I think |
|
Okay, I'll simply remove the condition and do |
|
@yuyichao I made the same mistake again. Could you please switch off the CI for the previous commits and enable it for the latest commit? Thanks. |
|
I canceled the extra travis build. I can't do that for AppVeyor ones but I think that one has auto detection. Anyway, this LGTM now. |
|
|
||
| # Issue #223 | ||
| @test 1 == threadid() <= nthreads() | ||
|
|
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.
Need import or qualified name.
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 the bug is in a previous line.
|
It seems |
|
Probably JuliaLang/julia#17078 @quinnj |
|
@yuyichao I see that JuliaLang/julia#17333 has been merged. Could you restart the build for this PR please? |
|
I can't restart the appveyor here so it's easier if you can rebase this pr. |
|
New failure should be fixed by #249. |
* Add `threadid()` and `nthreads()` * Fix `const` in definition * Fix condition in test * Remove condition and modify test * Fix bug in export
Fixes #223 .