Closed umartin closed 2 weeks ago
You could use ThreadLocals for that to benefit from cached instance but being thread safe
Avoid thread locals if possible. They are an anti-pattern for that purpose, and don’t play well with virtual threads.
@martint I'm not sure whether this is still true for VT once the object monitor stuff gets merged but I agree that it should be avoided.
@umartin Please follow the commit message guideline from next time: https://trino.io/development/process#pull-request-and-commit-guidelines-
Description
This is a follow up to PR #23894 As discussed in the original PR the WKBReader is not thread-safe. This PR removes the static instance.
Additional context and related issues
PR #23894
Release notes
(x) This is not user-visible or is docs only, and no release notes are required. ( ) Release notes are required. Please propose a release note for me. ( ) Release notes are required, with the following suggested text: