diff --git a/cxx/fbjni/JThread.h b/cxx/fbjni/JThread.h index 5e64184..abb51c7 100644 --- a/cxx/fbjni/JThread.h +++ b/cxx/fbjni/JThread.h @@ -65,6 +65,12 @@ class JThread : public JavaClass { static const auto method = getClass()->getMethod("setPriority"); method(self(), priority); } + + void setName(const std::string& name) { + static const auto method = + getClass()->getMethod)>("setName"); + method(self(), make_jstring(std::move(name))); + } }; } // namespace jni