Use a semaphore to synchronize threads instead of blocking with join(). Lock threads array in order to ensure all of them are signalled. #2394

This commit is contained in:
Alessandro Ranellucci 2014-12-13 15:01:53 +01:00
parent 84760b8d59
commit e9166a8fe6
2 changed files with 41 additions and 28 deletions

View file

@ -426,7 +426,6 @@ sub make_perimeters {
$self->get_layer($i)->make_perimeters;
}
},
collect_cb => sub {},
no_threads_cb => sub {
$_->make_perimeters for @{$self->layers};
},
@ -506,7 +505,6 @@ sub infill {
$layerm->fills->append($_) for $self->fill_maker->make_fill($layerm);
}
},
collect_cb => sub {},
no_threads_cb => sub {
foreach my $layerm (map @{$_->regions}, @{$self->layers}) {
$layerm->fills->clear;