8 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl
use threads;
use threads::shared;
my $t = threads->new(\&kind);
sub kind {
vater(); # Aufruf von Sub im Elternprozess
return;
}
sub vater {
# hier sind wir wieder im Elternprozess
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl
use strict;
use Tk;
use threads qw(yield);
use threads::shared;
my $win = MainWindow->new();
my $t = threads->new(\&kind);
sub kind {
sleep(3);
eltern("hallo Mama");
return;
}
sub eltern {
$win->configure(-title=>"$_[0]");
}
MainLoop;
1
2
3
4
Tk::Error: Can't call method "Call" on an undefined value at C:/Perl/site/lib/Tk
/After.pm line 89.
[once,[{},after#1,idle,once,[ConfigChanged,{},{}]]]
("after" script)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl
use strict;
use Tk;
use threads qw(yield);
use threads::shared;
my $win = MainWindow->new(-title => "man");
my $t = threads->new(\&kind);
sub kind {
sleep(3);
$win->configure(-title=>"dad");
$win->update();
return;
}
MainLoop;
8 Einträge, 1 Seite |