[lld] r317632 - Use std::thread directly.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 7 15:16:43 PST 2017
Can you remove runBackground because I think this is the last user of the
function?
On Tue, Nov 7, 2017 at 3:09 PM, Rafael Espindola via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: rafael
> Date: Tue Nov 7 15:09:54 2017
> New Revision: 317632
>
> URL: http://llvm.org/viewvc/llvm-project?rev=317632&view=rev
> Log:
> Use std::thread directly.
>
> Now that this code is posix only we don't need to use runBackground.
>
> Modified:
> lld/trunk/ELF/Filesystem.cpp
>
> Modified: lld/trunk/ELF/Filesystem.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/
> Filesystem.cpp?rev=317632&r1=317631&r2=317632&view=diff
> ============================================================
> ==================
> --- lld/trunk/ELF/Filesystem.cpp (original)
> +++ lld/trunk/ELF/Filesystem.cpp Tue Nov 7 15:09:54 2017
> @@ -20,6 +20,7 @@
> #if defined(HAVE_UNISTD_H)
> #include <unistd.h>
> #endif
> +#include <thread>
>
> using namespace llvm;
>
> @@ -61,7 +62,7 @@ void elf::unlinkAsync(StringRef Path) {
> sys::fs::remove(Path);
>
> // close and therefore remove TempPath in background.
> - runBackground([=] { ::close(FD); });
> + std::thread([=] { ::close(FD); }).detach();
> #endif
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171107/fb5bd259/attachment.html>
More information about the llvm-commits
mailing list