Skip to content

Commit

Permalink
Merge pull request #1257 from SpiNNakerManchester/fix_command_sender
Browse files Browse the repository at this point in the history
Fix command sender
  • Loading branch information
Christian-B authored Jan 20, 2025
2 parents d31c12d + e47d787 commit e4eebee
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,17 @@ def add_commands(
command_keys: Set[int] = set()
self._vertex_to_key_map[vertex_to_send_to] = set()

# We need to hold these properly, as they might be generators!
sr_commands = list(start_resume_commands)
ps_commands = list(pause_stop_commands)
t_commands = list(timed_commands)

# update holders
self._commands_at_start_resume.extend(start_resume_commands)
self._commands_at_pause_stop.extend(pause_stop_commands)
self._timed_commands.extend(timed_commands)
self._commands_at_start_resume.extend(sr_commands)
self._commands_at_pause_stop.extend(ps_commands)
self._timed_commands.extend(t_commands)

for commands in (
start_resume_commands, pause_stop_commands, timed_commands):
for commands in (sr_commands, ps_commands, t_commands):
for command in commands:
# track keys
command_keys.add(command.key)
Expand Down

0 comments on commit e4eebee

Please sign in to comment.