| … | … | @@ -160,12 +160,18 @@ Handle RocksStorage::decodeFrame(const std::string& senc) |
| 160 | 160 | asp->set_name(name); |
| 161 | 161 | asp->set_copy_on_write(); |
| 162 | 162 | |
| 163 | | // Ugh. This feels slightly awkward, but I think it is correct. |
| 164 | | // Add the current asp to the first parent; this will trigger a |
| 165 | | // snowball that will install all the others too. It works this |
| 166 | | // way because not all of the "parents" are actually AtomSpaces; |
| 167 | | // they might be executable Atoms that return AtomSpaces. This |
| 168 | | // is all handled in AtomSpace::install(). |
| 163 | // The list of parents in oset is copied to the AtomSpaces copy |
| 164 | // of the parents, held in the _environ vector, only when this |
| 165 | // AtomSpace is explicity inserted into some parent, any parent. |
| 166 | // This delayed initilaization serves two purposes. First, not |
| 167 | // all of the "parents" need be actual AtomSpaces; they might be |
| 168 | // executable Atoms that return AtomSpaces. Execution has to be |
| 169 | // defered until that time when parentage is known. This is |
| 170 | // performed in `AtomSpace::install()`. |
| 171 | // |
| 172 | // XXX FIXME Actually this handling is broken in RocksStorage. |
| 173 | // If you are reading this, then you probably already know. |
| 174 | // I'm not sure what the right fix is. For now, its good enough. |
| 169 | 175 | Handle hasp = HandleCast(asp); |
| 170 | 176 | for (const Handle& parent : oset) |
| 171 | 177 | { |