<div dir="ltr">Can you remove runBackground because I think this is the last user of the function?</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 7, 2017 at 3:09 PM, Rafael Espindola via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rafael<br>
Date: Tue Nov  7 15:09:54 2017<br>
New Revision: 317632<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=317632&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=317632&view=rev</a><br>
Log:<br>
Use std::thread directly.<br>
<br>
Now that this code is posix only we don't need to use runBackground.<br>
<br>
Modified:<br>
    lld/trunk/ELF/Filesystem.cpp<br>
<br>
Modified: lld/trunk/ELF/Filesystem.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Filesystem.cpp?rev=317632&r1=317631&r2=317632&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/ELF/<wbr>Filesystem.cpp?rev=317632&r1=<wbr>317631&r2=317632&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/ELF/Filesystem.cpp (original)<br>
+++ lld/trunk/ELF/Filesystem.cpp Tue Nov  7 15:09:54 2017<br>
@@ -20,6 +20,7 @@<br>
 #if defined(HAVE_UNISTD_H)<br>
 #include <unistd.h><br>
 #endif<br>
+#include <thread><br>
<br>
 using namespace llvm;<br>
<br>
@@ -61,7 +62,7 @@ void elf::unlinkAsync(StringRef Path) {<br>
   sys::fs::remove(Path);<br>
<br>
   // close and therefore remove TempPath in background.<br>
-  runBackground([=] { ::close(FD); });<br>
+  std::thread([=] { ::close(FD); }).detach();<br>
 #endif<br>
 }<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>