Specialize and implement setThreadName only on some platforms
authorYedidya Feldblum <yfeldblum@fb.com>
Fri, 16 Oct 2015 01:55:27 +0000 (18:55 -0700)
committerfacebook-github-bot-9 <folly-bot@fb.com>
Fri, 16 Oct 2015 02:20:22 +0000 (19:20 -0700)
commit4463e2301ce61477bbe4c0982d699158db33637f
treee9a17d9586dc9bb7d1b43050ead674473f811a41
parent77a85008801bae6d8bf7767dc2b0e8542373cd4a
Specialize and implement setThreadName only on some platforms

Summary: [Folly] Specialize and implement `setThreadName` only on some platforms.

With this technique, we can compile setThreadName and programs that call it on MSVC/Windows and on other platforms that don't have the underlying pthread call.

This is an alternative to: https://reviews.facebook.net/D46317.

Reviewed By: @nbronson

Differential Revision: D2535593

fb-gh-sync-id: 09d26f53e3fe69b49326b5b6492a7d59f86db2e8
folly/ThreadName.h
folly/test/Makefile.am
folly/test/ThreadNameTest.cpp [new file with mode: 0644]