Fix thread-safety issues in concurrent code paths#2054
Draft
Fix thread-safety issues in concurrent code paths#2054
Conversation
Collaborator
|
Ok I didn't know it was going to make a pr... |
Co-authored-by: kevinthegreat1 <92656833+kevinthegreat1@users.noreply.github.com>
Co-authored-by: kevinthegreat1 <92656833+kevinthegreat1@users.noreply.github.com>
Collaborator
|
Don't make just random code thread-safe. Only check for thread safety in actual concurrent code that is being accessed by multiple threads. |
Copilot
AI
changed the title
[WIP] Review concurrency and identify non-thread-safe code
Fix thread-safety issues in concurrent code paths
Jan 20, 2026
kevinthegreat1
requested changes
Jan 20, 2026
Collaborator
kevinthegreat1
left a comment
There was a problem hiding this comment.
Don't make just random code thread-safe. Only check for thread safety in actual concurrent code that is being accessed by multiple threads.
…ently Co-authored-by: kevinthegreat1 <92656833+kevinthegreat1@users.noreply.github.com>
Author
Reverted changes to code without actual concurrent access. Kept only:
Reverted DiscordRPCManager, SecretsTracker, and SkyblockerWebSocket (events/calls are sequential, no real concurrency). Commit: 11a3eaa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes thread-safety issues in classes where async tasks write to shared state that is read by the main/render thread.
Changes
hypixelProfile,playerProfile,entity, etc.) for visibility of async writes to render threadstoragesto guarantee visibility and atomic operations across threadsitemsImported/filesImportedflags for visibility across async loading and synchronous readsScope
Only code with verified concurrent access has been modified - specifically cases where:
Code using CompletableFutures but without actual concurrent access to shared mutable state (e.g., sequential event handlers, serialized task queues) has not been modified.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.