mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00:00
Workaround dclone() not being thread-safe
This commit is contained in:
@@ -32,6 +32,11 @@ sub clone {
|
||||
Storable::dclone($_[0])
|
||||
}
|
||||
|
||||
sub threadsafe_clone {
|
||||
my $self = shift;
|
||||
return (ref $self)->new(map $_->threadsafe_clone, @$self);
|
||||
}
|
||||
|
||||
sub contour {
|
||||
my $self = shift;
|
||||
return $self->[0];
|
||||
@@ -303,7 +308,7 @@ has 'expolygons' => (is => 'ro', default => sub { [] });
|
||||
sub clone {
|
||||
my $self = shift;
|
||||
return (ref $self)->new(
|
||||
expolygons => [ map $_->clone, @{$self->expolygons} ],
|
||||
expolygons => [ map $_->threadsafe_clone, @{$self->expolygons} ],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user