-
-
Notifications
You must be signed in to change notification settings - Fork 236
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
feat: do not wait for chunk loads when calling #2912
base: main
Are you sure you want to change the base?
Conversation
3a3648f
to
bd3cc64
Compare
Please take a moment and address the merge conflicts of your pull request. Thanks! |
6c31979
to
45f84fb
Compare
Please take a moment and address the merge conflicts of your pull request. Thanks! |
45f84fb
to
56b7c6e
Compare
56b7c6e
to
7fe7ec3
Compare
5cb0b3b
to
051f5c3
Compare
@@ -118,6 +124,7 @@ public boolean trim(boolean aggressive, int layer) { | |||
public synchronized IChunkSet reset() { | |||
for (int i = 0; i < sectionCount; i++) { | |||
sections[i] = EMPTY; | |||
VarHandle.storeStoreFence(); |
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.
Should we synchronize on the section lock instead? Although there might be more places (e.g. loadIfPresent) where we don't synchronize...
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.
This is just to enforce order of operation in compiled code, I did not believe that it would necessarily be enforced given it's nested, despite the sync on the method
if (!callLock.isHeldByCurrentThread()) { | ||
throw new IllegalStateException("Attempted to call chunk GET but chunk was not call-locked."); | ||
} | ||
forceLoadSections = false; | ||
LevelChunk nmsChunk = ensureLoaded(serverLevel, chunkX, chunkZ); | ||
final ServerLevel nmsWorld = serverLevel; |
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.
Given large parts of that logic aren't version-specific, can we somehow reduce duplication here?
Please take a moment and address the merge conflicts of your pull request. Thanks! |
051f5c3
to
162dea8
Compare
a0b008a
to
adb22c7
Compare
adb22c7
to
0efd9ed
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.
Seems to work
No description provided.