Skip to content

Commit

Permalink
Re-enable parallel evaluation.
Browse files Browse the repository at this point in the history
  • Loading branch information
luleyleo committed Jul 14, 2023
1 parent 271c65a commit 2e6ed73
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/evaluation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ pub fn evaluate_suite(
scope.spawn(move || {
let mut pool = scoped_threadpool::Pool::new(threads);

while let Some(instance) = suite.next() {
// Create a new suite, because COCO doesn't guarantee that
// multiple problems can be created from one suite simultaneously.
let mut suite = suite.clone();
pool.scoped(move |pool| {
while let Some(instance) = suite.next() {
// Create a new suite, because COCO doesn't guarantee that
// multiple problems can be created from one suite simultaneously.
let mut suite = suite.clone();

pool.scoped(move |pool| {
pool.execute(move || {
let state = configuration
.optimize_with(&instance, |state| {
Expand All @@ -47,8 +47,8 @@ pub fn evaluate_suite(

on_complete(instance, state);
});
});
}
}
});
});

Ok(())
Expand Down

0 comments on commit 2e6ed73

Please sign in to comment.