[PATCH] D51475: [clangd] Load YAML static index asynchronously.
    Ilya Biryukov via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Thu Aug 30 06:06:44 PDT 2018
    
    
  
ilya-biryukov added inline comments.
================
Comment at: clangd/tool/ClangdMain.cpp:86
+      return nullptr;
+    Index = AsyncLoad.get();
+    return Index.get();
----------------
I believe is a data race (multiple threads may run this line concurrently).
You would want some synchronization around this, `std::shared_future` could be a good fit
Repository:
  rCTE Clang Tools Extra
https://reviews.llvm.org/D51475
    
    
More information about the cfe-commits
mailing list