3 unless ($Config{useithreads}) {
4 print "1..0 # SKIP your perl does not support ithreads\n";
14 plan skip_all => 'DBIC does not actively support threads before perl 5.8.5'
20 # README: If you set the env var to a number greater than 10,
21 # we will use that many children
22 my $num_children = $ENV{DBICTEST_THREAD_STRESS} || 1;
23 if($num_children !~ /^[0-9]+$/ || $num_children < 10) {
27 my $schema = DBICTest->init_schema(no_deploy => 1);
28 isa_ok ($schema, 'DBICTest::Schema');
31 push @threads, threads->create(sub {
32 my $rsrc = $schema->source('Artist');
34 isa_ok ($rsrc->schema, 'DBICTest::Schema');
35 my $s2 = $rsrc->schema->clone;
37 sleep 1; # without this many tasty crashes
38 }) for (1.. $num_children);
39 ok(1, "past spawning");
41 $_->join for @threads;
42 ok(1, "past joining");