The way buffer recycling works with BufferRecycler assumes that not only is access to reading, writing single-threaded (which typically is true), access to any particular parser, generator is from a single thread. But this is not necessarily true, especially in case of async parsing where processing thread may change over time in pipeline setups for example.
Handling should be changed to make this usage safe, using experience from Jackson and Woodstox on adding simple safeguards and synchronization.
(note: related to https://github.com/FasterXML/woodstox/issues/82)
The way buffer recycling works with
BufferRecycler
assumes that not only is access to reading, writing single-threaded (which typically is true), access to any particular parser, generator is from a single thread. But this is not necessarily true, especially in case of async parsing where processing thread may change over time in pipeline setups for example.Handling should be changed to make this usage safe, using experience from Jackson and Woodstox on adding simple safeguards and synchronization.