my $var1 : shared('a') = 3; my $var2 : shared('a'); my $var3 : shared('b') = 10; #### my $done : shared = 0; my $results : shared; async { $results = someLongRunningFunction(); ++$done; }; # do other stuff ... if( $done ) { ## use $results; } #### my $start = time(); my $content : shared; async{ $content = $lwp->get( $url ); }; sleep 1 while time() < $start +3; unless( defined $content ) { ## shutdown the socket } ## use the $content.