| 206 | return self._remote_nets |
| 207 | |
| 208 | def add(self, task): |
| 209 | assert not self._already_used, ( |
| 210 | 'Cannot add Task to an already used TaskGroup.') |
| 211 | assert ( |
| 212 | self._workspace_type is None or |
| 213 | task._workspace_type is None or |
| 214 | self._workspace_type == task._workspace_type) |
| 215 | if task._workspace_type is None: |
| 216 | task._workspace_type = ( |
| 217 | self._workspace_type or WorkspaceType.PRIVATE) |
| 218 | if self._workspace_type is None: |
| 219 | self._workspace_type = task._workspace_type |
| 220 | task._notify_used() |
| 221 | self._tasks.append(task) |
| 222 | |
| 223 | def tasks(self): |
| 224 | for task in self._tasks_to_add: |