- or download this
my $thr = threads->create({'context' => 'list'}, \&foo);
...
my @results = $thr->join();
- or download this
my $thr = threads->create({'context' => 'void'}, \&foo);
...
$thr->join();
- or download this
threads->create({'scalar' => 1}, \&foo);
...
my ($thr) = threads->list();
my $result = $thr->join();
- or download this
# Create thread in list context
my ($thr) = threads->create(...);
...
# Create thread in void context
threads->create(...);