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

Method flush

lib/cpp/src/thrift/transport/TFileTransport.cpp:518–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516}
517
518void TFileTransport::flush() {
519 resetConsumedMessageSize();
520 // file must be open for writing for any flushing to take place
521 if (!writerThread_.get()) {
522 return;
523 }
524 // wait for flush to take place
525 Guard g(mutex_);
526
527 // Indicate that we are requesting a flush
528 forceFlush_ = true;
529 // Wake up the writer thread so it will perform the flush immediately
530 notEmpty_.notify();
531
532 while (forceFlush_) {
533 flushed_.wait();
534 }
535}
536
537uint32_t TFileTransport::readAll(uint8_t* buf, uint32_t len) {
538 checkReadBytesAvailable(len);

Callers

nothing calls this directly

Calls 3

getMethod · 0.45
notifyMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected