ThreadLocal::Get(): hold reader-writer mutex before calling the callback.
This allows users to not need to worry about thread safety in their callback implementations. In particular, this fixes a race in the BVHAggregate's use of ThreadLocal that rarely led to crashes or complaints about malloc heap corruption during BVH construction.
Showing
想要评论请 注册 或 登录