Promptly freeing the per-thread cached direct buffers when a thread exits

Alan Bateman Alan.Bateman at
Mon Apr 9 14:26:09 UTC 2018

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 


More information about the core-libs-dev mailing list