Hi Duc, > how can I safely stop a llvm thread, so that the thread can clean up. Using the > WINAPI TerminateThread() is therefore not an alternative. I work with vs2010. LLVM doesn't have any threads. Ciao, Duncan.