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

Method action

flow/IThreadPoolTest.actor.cpp:94–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 };
93
94 void action(GetNameAction& a) {
95 pthread_t t = pthread_self();
96 const size_t arrayLen = 16;
97 char name[arrayLen];
98 int err = pthread_getname_np(t, name, arrayLen);
99 if (err != 0) {
100 std::cout << "Get name failed with error code: " << err << std::endl;
101 notifications->sendError(platform_error());
102 return;
103 }
104 notifications->send(name);
105 }
106
107 struct FaultyAction final : TypedAction<ThreadSafePromiseStreamSender, FaultyAction> {
108 double getTimeEstimate() const override { return 3.; }

Callers

nothing calls this directly

Calls 3

asInjectedFaultMethod · 0.80
sendErrorMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected