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

PreparedPolygon is not thread safe #747

Closed
ivanveselovsky-tomtom opened this issue Jun 21, 2021 · 0 comments · Fixed by #746
Closed

PreparedPolygon is not thread safe #747

ivanveselovsky-tomtom opened this issue Jun 21, 2021 · 0 comments · Fixed by #746

Comments

@ivanveselovsky-tomtom
Copy link
Contributor

ivanveselovsky-tomtom commented Jun 21, 2021

JavaDoc of PreparedGeometry says "Subclasses are intended to be thread-safe, to allow PreparedGeometry to be used in a multi-threaded context (which allows extracting maximum benefit from the prepared state)."
However, PreparedPolygon is not thread safe, and under concurrent load may give sometimes incorrect result of #contains(Geometry) method. This effect and suggested fix are shown in this PR: #746 .

@dr-jts dr-jts changed the title PreparedPolygon should be thread safe PreparedPolygon is not thread safe Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants