Exemplo n.º 1
0
/* Send all I/O forwarded data to master */
void TaskHandler::send_io_data() {
    for (unsigned i = 0; i < this->forwards.size(); i++) {
        Forward *f = this->forwards[i];
        log_trace("Task %s: Forward %s got %d bytes", name.c_str(), 
                f->destination().c_str(), f->size());

        // Don't bother to send the message if there is no data
        if (f->size() == 0) {
            continue;
        }

        IODataMessage iodata(this->name, f->destination(), f->data(), f->size());
        worker->comm->send_message(&iodata, 0);
    }
}