File: 03_threads.t

package info (click to toggle)
libcrypt-dh-gmp-perl 0.00010-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 420 kB
  • sloc: perl: 2,009; ansic: 201; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 343 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use Test::More;
use threads;
use_ok "Crypt::DH::GMP";

my $x = Crypt::DH::GMP->new; 
my @threads;
for (1..5) {
    push @threads, threads->create(sub{
        note( "spawned thread : " . threads->tid() );
    });
}

foreach my $thr (@threads) {
    note( "joining thread : " . $thr->tid );
    $thr->join;
}

ok(1);
done_testing();