This PR introduces shared locks so that it can improve the locking strategy. Basically, it takes a shared lock when a function only needs to read from the system, and it takes an exclusive lock when a function needs to modify what's written on the system.
Coverage increased (+0.2%) to 65.704% when pulling 55acdf5fc7c807a18b161bcd106fd2de66ca7790 on sboeuf/improve_locking into bad7e7437b173ab22f858d0f43f85a4c201af604 on master.
Coverage increased (+0.1%) to 65.677% when pulling eb838bff225f0d3a0b7c53b329a946e7f745abe8 on sboeuf/improve_locking into bad7e7437b173ab22f858d0f43f85a4c201af604 on master.
Coverage increased (+0.1%) to 66.115% when pulling 775450736af15e39f15f045bda4cd3752a543224 on sboeuf/improve_locking into db99bdff3281c93adee501b614db1047f5f9d2ee on master.
Coverage increased (+0.1%) to 65.749% when pulling 1bf27537b9dea017282c40a13bc957a201a9a263 on sboeuf/improve_locking into 68f1c9e0842617e0b5017c2c538085d333c46de7 on master.
Coverage increased (+0.2%) to 65.109% when pulling bfe612e2bbc66ebeb303a6f5664a0b93c5c40907 on sboeuf/improve_locking into a87d07f5d1e9d2c64a9d26a85d5d210d1075337f on master.
Coverage increased (+0.2%) to 65.109% when pulling 2939ef95cefa2de3d3e4f761c97bf877c3588ba4 on sboeuf/improve_locking into a87d07f5d1e9d2c64a9d26a85d5d210d1075337f on master.
Coverage increased (+0.2%) to 64.953% when pulling f258286d8aba3bb76dde1dcd847d4530200c8450 on sboeuf/improve_locking into fd28ae5db00b2a8c95567a8bda88fb36dfc05ecd on master.
Coverage increased (+0.1%) to 64.851% when pulling e2f590244aba7ec299e91c40028228f51cc84826 on sboeuf/improve_locking into 96c5909c53501a76ecf1c020d6e4885945dc20c6 on master.
This PR introduces shared locks so that it can improve the locking strategy. Basically, it takes a shared lock when a function only needs to read from the system, and it takes an exclusive lock when a function needs to modify what's written on the system.
Fixes #421