Work in progress: Good bye, Perl Threads!
This commit is contained in:
parent
86b79f89ad
commit
e931f75010
31 changed files with 833 additions and 1069 deletions
35
t/threads.t
35
t/threads.t
|
@ -1,35 +0,0 @@
|
|||
use Test::More tests => 2;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
BEGIN {
|
||||
use FindBin;
|
||||
use lib "$FindBin::Bin/../lib";
|
||||
use local::lib "$FindBin::Bin/../local-lib";
|
||||
}
|
||||
|
||||
use List::Util qw(first);
|
||||
use Slic3r;
|
||||
use Slic3r::Test;
|
||||
|
||||
{
|
||||
my $print = Slic3r::Test::init_print('20mm_cube');
|
||||
{
|
||||
my $thread = threads->create(sub { Slic3r::thread_cleanup(); return 1; });
|
||||
ok $thread->join, "print survives thread spawning";
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
my $thread = threads->create(sub {
|
||||
{
|
||||
my $print = Slic3r::Test::init_print('20mm_cube');
|
||||
Slic3r::Test::gcode($print);
|
||||
}
|
||||
Slic3r::thread_cleanup();
|
||||
return 1;
|
||||
});
|
||||
ok $thread->join, "process print in a separate thread";
|
||||
}
|
||||
|
||||
__END__
|
Loading…
Add table
Add a link
Reference in a new issue