Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Felix Seibert
xtreemfs_client
Commits
fd7dc3d9
Commit
fd7dc3d9
authored
Mar 16, 2018
by
Felix Seibert
Browse files
fixing changed set during iteration
parent
590952f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
xtreemfs_client/div_util.py
View file @
fd7dc3d9
...
...
@@ -41,12 +41,14 @@ def run_commands(commands, max_processes=200):
running_processes
.
add
(
started_process
)
if
len
(
running_processes
)
>=
max_processes
:
os
.
wait
()
difference
=
set
()
for
running_process
in
running_processes
:
if
running_process
.
poll
()
is
not
None
:
finished_processes
.
appen
d
((
running_process
.
args
,
difference
.
ad
d
((
running_process
.
args
,
running_process
.
communicate
(),
running_process
.
returncode
))
running_processes
.
remove
(
running_process
)
running_processes
=
running_processes
.
difference
(
difference
)
for
p
in
running_processes
:
p
.
wait
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment