mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Workaround dclone() not being thread-safe
This commit is contained in:
		
							parent
							
								
									9dbf21235c
								
							
						
					
					
						commit
						8d1069766b
					
				
					 3 changed files with 16 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -22,6 +22,11 @@ sub clone {
 | 
			
		|||
    Storable::dclone($_[0])
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub threadsafe_clone {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    return (ref $self)->new(map $_->threadsafe_clone, @$self);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub serialize {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    return pack 'l*', map @$_, @$self;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue