MCPcopy Create free account
hub / github.com/apache/thrift / beginAsyncRead

Method beginAsyncRead

lib/cpp/src/thrift/transport/TPipe.cpp:142–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140};
141
142void TWaitableNamedPipeImpl::beginAsyncRead(uint8_t* buf, uint32_t len) {
143 begin_unread_idx_ = end_unread_idx_ = 0;
144 readOverlap_.reset(buf, len, ready_event_.h);
145 thread_->addWorkItem(&readOverlap_);
146 if (readOverlap_.success == FALSE && readOverlap_.last_error != ERROR_IO_PENDING) {
147 TOutput::instance().perror("TPipe ::ReadFile errored GLE=", readOverlap_.last_error);
148 throw TTransportException(TTransportException::UNKNOWN, "TPipe: ReadFile failed");
149 }
150}
151
152uint32_t TWaitableNamedPipeImpl::endAsyncRead() {
153 return readOverlap_.overlappedResults();

Callers

nothing calls this directly

Calls 4

addWorkItemMethod · 0.80
TTransportExceptionClass · 0.70
resetMethod · 0.45
perrorMethod · 0.45

Tested by

no test coverage detected