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