Eliminate one shared static this from thread.d#1837
Conversation
6bf4a5a to
c31ff35
Compare
|
ping |
|
ping |
|
CC @nrTQgc @nemanja-boric-sociomantic @andralex I think this PR would be easier to review if you described the changes in more detail (ideally in the commit message), as the diff is hard to make sense of even with ?w=1. |
|
|
||
| pcParms.pc_cid = PC_CLNULL; | ||
| if (priocntl(idtype_t.P_PID, P_MYID, PC_GETPARMS, &pcParms) == -1) | ||
| assert( 0, "Unable to get scheduling class" ); |
There was a problem hiding this comment.
Nit pick: these asserts could have the unified syntax with version(Posix) - no ifs
There was a problem hiding this comment.
Looking over code, I don't get the idea for refactoring.
There was a problem hiding this comment.
Yeah, me neither anymore. All good, sorry.
There was a problem hiding this comment.
Ah, I see it now: https://github.com/dlang/druntime/pull/1837/files#diff-8bb12ed976acf0a5132e877ec5a01ea8R1021
priocntl(...) != -1 || assert (0, "Unable to get scheduling class.");
I don't think it's important, though.
src/core/thread.d
Outdated
|
|
||
| static int loadGlobal(string which)() //@nogc nothrow pure @safe | ||
| { | ||
| shared Priority cache; |
There was a problem hiding this comment.
Can this be static shared Priority cache?
There was a problem hiding this comment.
@nemanja-boric-sociomantic ah, that was the whole idea :). Thanks!
|
Other than that LGTM. |
|
Just to check, this comment: is not valid anymore, right? (I can't see any changes done for |
|
Ping :-) |
|
@nemanja-boric-sociomantic yah, that comment about NetBSD is not valid, sorry for the confusion. |
c31ff35 to
bce06dd
Compare
|
Thanks for your pull request, @andralex! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
|
@CyberShadow added comments |
|
Looks good, thanks! Needs squash and it's good to go AFAICS. |
|
Just needs squash @andralex |
bce06dd to
81320e9
Compare
The Windows implementation does not need any initialization.