Partial GUI compatibility with XS data

This commit is contained in:
Alessandro Ranellucci 2013-07-07 18:43:04 +02:00
parent 8380ca812b
commit 5409c27852
4 changed files with 11 additions and 14 deletions

View file

@ -86,7 +86,14 @@ sub parallelize {
my $q = Thread::Queue->new;
$q->enqueue(@items, (map undef, 1..$Config->threads));
my $thread_cb = sub { $params{thread_cb}->($q) };
my $thread_cb = sub {
# prevent destruction of shared objects
no warnings 'redefine';
*Slic3r::ExPolygon::XS::DESTROY = sub {};
return $params{thread_cb}->($q);
};
@_ = ();
foreach my $th (map threads->create($thread_cb), 1..$Config->threads) {
$params{collect_cb}->($th->join);