Add the given node to the load queue. The return value can optionally be awaited until the queue is empty. Args: node: The node to add to the load queue. Returns: An optionally awaitable object that can be awaited until the load queu
(self, node: TreeNode[DirEntry])
| 185 | self.path = path |
| 186 | |
| 187 | def _add_to_load_queue(self, node: TreeNode[DirEntry]) -> AwaitComplete: |
| 188 | """Add the given node to the load queue. |
| 189 | |
| 190 | The return value can optionally be awaited until the queue is empty. |
| 191 | |
| 192 | Args: |
| 193 | node: The node to add to the load queue. |
| 194 | |
| 195 | Returns: |
| 196 | An optionally awaitable object that can be awaited until the |
| 197 | load queue has finished processing. |
| 198 | """ |
| 199 | assert node.data is not None |
| 200 | if not node.data.loaded: |
| 201 | node.data.loaded = True |
| 202 | self._load_queue.put_nowait(node) |
| 203 | |
| 204 | return AwaitComplete(self._load_queue.join()) |
| 205 | |
| 206 | def reload(self) -> AwaitComplete: |
| 207 | """Reload the `DirectoryTree` contents. |
no test coverage detected