On 09/04/2018 11:26, Peter Levart wrote:
If adding a field to Thread class is a concern, I can modify this to
use a special ThreadLocal instance to keep registered callback(s) per
thread.
Thanks for the prototype, that is along the lines of what I was
thinking. I also think it would be good to prototype is as a thread
local so that there isn't another Thread field.
Another thought: if threads are guaranteed to free the cached buffers
then we may be able to create the direct buffer without an associated
cleaner.
-Alan