X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=folly%2FThreadName.cpp;h=a24a6b8bd1fe1dfe38e61c1fb9529c4c56ca9379;hp=3e2d9aab189218a34db1a0b5067ccaa7eb69fc6a;hb=58a70372d16f13a952ecc046fa90ce055fb6f36a;hpb=6a7b70f8da1bc06d188aa2e67449a651a16ff5b5 diff --git a/folly/ThreadName.cpp b/folly/ThreadName.cpp index 3e2d9aab..a24a6b8b 100644 --- a/folly/ThreadName.cpp +++ b/folly/ThreadName.cpp @@ -90,6 +90,10 @@ bool setThreadName(std::thread::id tid, StringPiece name) { #if FOLLY_HAVE_PTHREAD bool setThreadName(pthread_t pid, StringPiece name) { +#if _WIN32 + // Not currently supported on Windows. + return false; +#else static_assert( std::is_same::value, "This assumes that the native handle type is pthread_t"); @@ -103,6 +107,7 @@ bool setThreadName(pthread_t pid, StringPiece name) { std::thread::id id; std::memcpy(&id, &pid, sizeof(id)); return setThreadName(id, name); +#endif } #endif