Workaround "Attempt to free unreferenced scalar..." on Linux 32-bit
This commit is contained in:
parent
76213fb5b7
commit
d0cbf56354
@ -94,9 +94,20 @@ sub parallelize {
|
||||
$q->enqueue(@items, (map undef, 1..$Config->threads));
|
||||
|
||||
my $thread_cb = sub {
|
||||
my $result = $params{thread_cb}->($q);
|
||||
$params{thread_cb}->($q);
|
||||
Slic3r::thread_cleanup();
|
||||
return $result;
|
||||
|
||||
# This explicit exit avoids an untrappable
|
||||
# "Attempt to free unreferenced scalar" error
|
||||
# triggered on Ubuntu 12.04 32-bit when we're running
|
||||
# from the Wx plater and
|
||||
# we're reusing the same plater object more than once.
|
||||
# The downside to using this exit is that we can't return
|
||||
# any value to the main thread but we're not doing that
|
||||
# anymore anyway.
|
||||
# collect_cb is completely useless now
|
||||
# and should be removed from the codebase.
|
||||
threads->exit;
|
||||
};
|
||||
$params{collect_cb} ||= sub {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user