[cfe-dev] cland and multi-threading

Douglas Gregor dgregor at apple.com
Fri Dec 10 07:47:06 PST 2010


On Dec 10, 2010, at 6:29 AM, Paul Curtis wrote:

> Hi All,
> 
> I have another question, which I couldn't readily find the answer for.
> 
> Given a single CXIndex, is it possible to run two (or more) parses using the
> clang API in parallel?  That is, could I create two threads and have two
> clang_parseTranslationUnit() calls running in different threads, using
> different translation units, concurrently?

Yes. Just don't access the same CXTranslation unit in two different threads concurrently.

	- Doug



More information about the cfe-dev mailing list