mbeckerle commented on PR #1539: URL: https://github.com/apache/daffodil/pull/1539#issuecomment-3207011701
> @mbeckerle, I just noticed that this doesn't replace the `ThreadLocal` in the `OnStack`. We do use `OnStack` in a handful of places, and it kindof does look the places where its used are pool-like and might benefit from the new `ThreadSafePool`, but I'm not too familiar with OnStack or what its intentions were. I _think_ you wrote it? Should we remove `OnStack` and replace it's usages with the new `ThreadSafePool`? OnStack is supposed to achieve, for Java/Scala code, what stack allocation achieves in C/C++. I.e., objects come and go (from a pool) using a stack discipline. The underlying mechanism of OnStack can use ThreadSafePool, but the goal is that you don't have to write the code that returns objects to the pool, exiting a scope does that automatically. In some sense OnStack is just a body "macro" for using a thread safe pool. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
