Skip to content

Commit ec3ca48

Browse files
committed
Allocate new lists for iterating components on start
1 parent d119eec commit ec3ca48

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nautilus_trader/trading/trader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,13 @@ def exec_algorithm_states(self) -> dict[ExecAlgorithmId, str]:
243243
# -- ACTION IMPLEMENTATIONS -----------------------------------------------------------------------
244244

245245
def _start(self) -> None:
246-
for actor in self._actors.values():
246+
for actor in list(self._actors.values()):
247247
actor.start()
248248

249-
for strategy in self._strategies.values():
249+
for strategy in list(self._strategies.values()):
250250
strategy.start()
251251

252-
for exec_algorithm in self._exec_algorithms.values():
252+
for exec_algorithm in list(self._exec_algorithms.values()):
253253
exec_algorithm.start()
254254

255255
def _stop(self) -> None:

0 commit comments

Comments
 (0)