Leser: 2
|< 1 2 >| | 20 Einträge, 2 Seiten |
1
2
3
4
5
C:\Dokumente und Einstellungen\froschpopo\Eigene Dateien\perl>ppm install thread
s::shared
Installing package 'threads-shared'...
Error installing package 'threads-shared': Read a PPD for 'threads-shared', but
it is not intended for this build of Perl (MSWin32-x86-multi-thread)
1
2
This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
use warnings;
use strict;
use threads;
use threads::shared;
my $var : shared = 0;
my $th_inc = threads->new( \&kind );
sub kind {
$var++;
return 0;
}
print "$var\n"; # sollte 1 ergeben
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl
use warnings;
use strict;
use threads;
use threads::shared;
my $var : shared = 0;
my $th_inc = threads->new( \&kind );
sub kind {
$var++;
return 0;
}
while(!$var) {
print "var: $var\n";
}
print "var: $var\n";
|< 1 2 >| | 20 Einträge, 2 Seiten |