Skip to content
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

The Simple BlockGraph Implementation is not Thread Safe #4

Open
Kneelawk opened this issue Oct 9, 2022 · 1 comment
Open

The Simple BlockGraph Implementation is not Thread Safe #4

Kneelawk opened this issue Oct 9, 2022 · 1 comment
Labels
wontfix This will not be worked on

Comments

@Kneelawk
Copy link
Owner

Kneelawk commented Oct 9, 2022

The Issue

Currently, accessing and mutating a block graph from multiple threads is likely to cause a ConcurrentModificationException or just give inconsistent data. The SimpleBlockGraph, SimpleBlockGraphController, and UnloadingRegionBasedStorage all expect to be used from a single thread only.

Potential Fix

It would likely not be too hard to add in some synchronization primitives, to allow for efficient use from multiple threads. This may be something like a RWLock for each internal collection.

@Kneelawk
Copy link
Owner Author

Kneelawk commented Oct 10, 2022

This is actually looking a lot more complicated now that I'm looking into it. I might have to abandon making this thread safe.

@Kneelawk Kneelawk added the wontfix This will not be worked on label Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant