Thread threads: kind an vater (7 answers)
Opened by Froschpopo at 2005-04-08 07:36

Froschpopo
 2005-04-08 20:41
#53602 #53602
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
so funktionierts endlich:
Code: (dl )
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;


Aber eine Frage hab ich noch:
Warum geht das auch, wenn ich $win nicht share?
Also es bedarf keines share($win), funzt trotzdem! WARUM?

Danke allen, thema beendet!\n\n

<!--EDIT|Froschpopo|1112978581-->

View full thread threads: kind an vater