diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm index 1d2849f1d..bd5215c4c 100644 --- a/lib/Slic3r.pm +++ b/lib/Slic3r.pm @@ -84,6 +84,7 @@ sub parallelize { $q->enqueue(@items, (map undef, 1..$Config->threads)); my $thread_cb = sub { $params{thread_cb}->($q) }; + @_ = (); foreach my $th (map threads->create($thread_cb), 1..$Config->threads) { $params{collect_cb}->($th->join); } diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index 0f9057ed7..a799a570c 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -288,6 +288,7 @@ sub check_version { my %p = @_; Slic3r::debugf "Checking for updates...\n"; + @_ = (); threads->create(sub { my $ua = LWP::UserAgent->new; $ua->timeout(10); diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 4f63271d6..1144e5072 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -545,6 +545,7 @@ sub export_gcode { $self->statusbar->StartBusy; if ($Slic3r::have_threads) { + @_ = (); $self->{export_thread} = threads->create(sub { $self->export_gcode2( $print, @@ -739,6 +740,7 @@ sub make_thumbnail { } }; + @_ = (); $Slic3r::have_threads ? threads->create($cb)->detach : $cb->(); }