Move IPC::Open2 from lib to ext
[p5sagit/p5-mst-13.2.git] / lib / Thread.t
index 2a0e2af..18694c5 100644 (file)
@@ -72,9 +72,15 @@ COND_:
         return Thread->self->tid;
     }
 
-    my $thr = Thread->new(\&thr_wait);
-    isa_ok($thr, 'Thread');
-    ok(! $thr->done(), 'Thread running');
+    my $thr;
+    {
+        lock($lock);
+        $thr = Thread->new(\&thr_wait);
+        isa_ok($thr, 'Thread');
+        ok(! $thr->done(), 'Thread running');
+    }
+    yield();
+    sleep(1);
 
     {
         lock($lock);