Help for this page

Select Code to Download


  1. or download this
    use threads qw(stringify);
    use threads::shared;
    my %contacts : shared;
    
  2. or download this
    $contacts{$contact} = &share( {} );
    share( $contacts{$contact}{'a'} );
    ...
    $contacts{$contact}{'a'} = 1;
    $contacts{$contact}{'inc_dnd'} = &share( {} );
    $contacts{$contact}{'lock'} = 0;
    
  3. or download this
      DB<2> print Dumper $contacts{$user_id}
    $VAR1 = {
              'inc_dnd' => {},
    ...
              'lock' => '0',
              'd' => '/tmp'
            };
    
  4. or download this
    170:            lock( $contacts{$user_id} );
      DB<2> print is_shared($contacts{$user_id})
    226839368
    ...
    lock can only be used on shared values at get_contacts_pool_photos.pl 
    +line 170.
     at get_contacts_pool_photos.pl line 170
            main::get_contacts_pool_photos() called at get_contacts_pool_p
    +hotos.pl line 93