Fix race condition between hasEntry and addObjectToCache#204
Fix race condition between hasEntry and addObjectToCache#204Jimilian wants to merge 1 commit intofrerich:masterfrom
Conversation
Current coverage is 78.79% (diff: 100%)@@ master #204 diff @@
==========================================
Files 1 1
Lines 929 929
Methods 0 0
Messages 0 0
Branches 155 155
==========================================
+ Hits 730 732 +2
Misses 166 166
+ Partials 33 31 -2
|
|
This destroys all concurrency since only one compile process can run a a time. The idea behind The more interesting question I guess is: why would a buildsystem build the same object file multiple times in parallel, which is when happens in this stacktrace, as far as I can see. |
|
Sorry, I thought that Question is pretty good. I can imagine two reasons:
So, if it breaks concurrency I will close this PR and just create for you. |
|
Good idea, I'll try to check that. Let me know if that stacktrace happens in non-#179 setups as well. I think you can close this in any case. |
This commit removes inconsistency between checking
hasEntryand creating new one. Now both actions are implemented with lock.Fix for #179 (comment):