mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
Partial GUI compatibility with XS data
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user