MCPcopy Create free account
hub / github.com/Tencent/phxqueue / Init

Method Init

phxqueue/comm/notifierpool.cpp:52–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52bool Notifier::Init() {
53 if (0 != pipe(impl_->fds)) {
54 QLErr("pipe fail");
55 return false;
56 }
57
58 // set nonblock for CoRead/CoWrite
59 {
60 for (int i{0}; i < 2; ++i) {
61 auto flags = fcntl(impl_->fds[i], F_GETFL, 0);
62 fcntl(impl_->fds[i], F_SETFL, flags | O_NONBLOCK);
63 }
64 }
65 return true;
66}
67
68void Notifier::Notify(const comm::RetCode retcode) {
69 int iretcode = as_integer(retcode);

Callers 1

GetMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected