[LLVMdev] ASTUnit Concurrent Access

Zachary Turner zturner at google.com
Fri May 30 12:56:41 PDT 2014


In ASTUnit.h, there is a ConcurrencyState class which has the following
comment;

  /// \brief Allows us to assert that ASTUnit is not being used
concurrently,
  /// which is not supported.
  ///
  /// Clients should create instances of the ConcurrencyCheck class whenever
  /// using the ASTUnit in a way that isn't intended to be concurrent,
which is
  /// just about any usage.
  /// Becomes a noop in release mode; only useful for debug mode checking.

In ASTUnit.cpp, there is a function called cleanupOnDiskMapAtExit(), which
has the following comment:

  // Use the mutex because there can be an alive thread destroying an
ASTUnit.

Can someone clarify the intended behavior here?  These two comments seem to
contradict each other.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140530/96a861be/attachment.html>


More information about the llvm-dev mailing list