| 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.; } |
nothing calls this directly
no test coverage detected