|< 1 2 >| | 11 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
while(1){
my $identification = @player;
$network->accept_client($identification);
if( $identification > ${$ptr_server_config}{'MAX_PLAYER'} ){
$network->protocol_error_max_player($identification);
}
$player[$identification] = cwt::player->new($identification);
$pthread_array[$identification] = threads->new(\&player_thread, $identification, $player[$identification]);
$cthread_array[$identification] = threads->new(\&controling_thread, $identification, $player[$identification]);
}
....
sub player_thread {
my $ID = $_[0];
my $player_object = $_[1];
....
}
sub controling_thread {
my $ID = $_[0];
my $player_object = $_[1];
....
}
Quotebless is not supported on shared references. In the current version, bless will only bless the thread local reference and the blessing will not propagate to the other threads. This is expected to be implemented in a future version of Perl.
|< 1 2 >| | 11 Einträge, 2 Seiten |