X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FThreadName.h;h=d78e2fa17a5430e52ca67664dcb3b676210aef2d;hb=49399f7cf36dfdda58e1bc01f2c9a1bc7a4ed400;hp=b55793ce5b9a06a7db319360c699680494b4a146;hpb=6bfd09a8b7e021d010760d52d06ff3db2797aa3e;p=folly.git diff --git a/folly/ThreadName.h b/folly/ThreadName.h index b55793ce..d78e2fa1 100644 --- a/folly/ThreadName.h +++ b/folly/ThreadName.h @@ -16,8 +16,10 @@ #pragma once +#include #include +#include #include #include #include @@ -33,6 +35,10 @@ bool canSetCurrentThreadName(); * threads other than the one currently executing. */ bool canSetOtherThreadName(); +/** + * Get the name of the current string, or nothing if an error occurs. + */ +Optional getCurrentThreadName(); bool setThreadName(std::thread::id tid, StringPiece name); #if FOLLY_HAVE_PTHREAD