| 1133 | } |
| 1134 | |
| 1135 | void DelayedExtend(SEXP values, int64_t size, RTasks& tasks) override { |
| 1136 | // the setup runs synchronously first |
| 1137 | Status setup = ExtendSetup(values, size, /*offset=*/0); |
| 1138 | |
| 1139 | if (!setup.ok()) { |
| 1140 | // if that fails, propagate the error |
| 1141 | tasks.Append(false, [setup]() { return setup; }); |
| 1142 | } else { |
| 1143 | // otherwise deal with each column, maybe concurrently |
| 1144 | auto fields = this->struct_type_->fields(); |
| 1145 | R_xlen_t n_columns = XLENGTH(values); |
| 1146 | |
| 1147 | for (R_xlen_t i = 0; i < n_columns; i++) { |
| 1148 | children_[i]->DelayedExtend(VECTOR_ELT(values, i), size, tasks); |
| 1149 | } |
| 1150 | } |
| 1151 | } |
| 1152 | |
| 1153 | protected: |
| 1154 | Status Init(MemoryPool* pool) override { |
nothing calls this directly
no test coverage detected