tsan: use read lock instead of write in atomic operations when possible
tsan: reorder SyncVar members to reduce contention