No need to synchronize for just reading an ivar, at least in MRI
Monitor `synchronize` became a little bit more costly since https://github.com/ruby/ruby/commit/f91879a7b5 even when then synchronization is nested, thus we'd better avoid unnecessary `synchronize { }` call for the majoriry platform that properly implements GVL.
Showing
想要评论请 注册 或 登录