Esempio n. 1
0
 Block Pop() {
     if (read_closed_) return Block();
     Block b;
     queue_.pop(b);
     read_closed_ = !b.IsValid();
     return b;
 }
Esempio n. 2
0
    //! Return next block for BlockQueue, store into caching File and return it.
    Block NextBlock() {
        Block b = queue_->Pop();

        // cache block in file_ (but not the termination block from the queue)
        if (b.IsValid())
            queue_->file_.AppendBlock(b);

        return b;
    }