MCPcopy Create free account
hub / github.com/apple/foundationdb / action

Method action

flow/IThreadPoolTest.actor.cpp:43–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 };
42
43 void action(GetNameAction& a) {
44 pthread_t t = pthread_self();
45 const size_t arrayLen = 16;
46 char name[arrayLen];
47 int err = pthread_getname_np(t, name, arrayLen);
48 if (err != 0) {
49 std::cout << "Get name failed with error code: " << err << std::endl;
50 a.name.sendError(platform_error());
51 return;
52 }
53 std::string s = name;
54 ASSERT(a.name.isValid());
55 a.name.send(std::move(s));
56 ASSERT(!a.name.isValid());
57 }
58};
59
60TEST_CASE("/flow/IThreadPool/NamedThread") {

Callers

nothing calls this directly

Calls 4

moveFunction · 0.85
sendErrorMethod · 0.45
isValidMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected