-
-
Notifications
You must be signed in to change notification settings - Fork 699
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
Issue 17564: Eliminate "static this" for theAllocator #5519
Conversation
5d25633
to
0d627bf
Compare
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.
LGTM - how about targeting stable
, s.t. it's part of the 2.075.0 release?
I originally did that, but then decided on master because it's not a regression. But thinking about it, it would simplify the matching vibe.d fix quite a lot. |
Please no enhancements on stable. |
std/experimental/allocator/package.d
Outdated
@@ -462,8 +462,8 @@ interface ISharedAllocator | |||
private shared ISharedAllocator _processAllocator; | |||
IAllocator _threadAllocator; |
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.
Please make this private so people can't access it before it's initialized
Excerpt from Bugzilla:
This sounds more like a blocking issue, not an enhancement ;-) |
This switches to lazy initialization of theAllocator, so that accessing it form within `shared static this` works as expected.
1a0221e
to
b8b60fb
Compare
Good reminder. |
CC @CyberShadow - yet another PR that hangs in the queue due to the project tester failures :/ |
This switches to lazy initialization of theAllocator, so that accessing it form within
shared static this
works as expected.