Syntax. async is shorter, but can only pass args via capture. Then again, passing args via create is known to be problematic.
Without args:
async(\&process); async { process(); }; thread->create(\&process);
With args:
async { process($arg); }; thread->create(\&process, $arg); # Safe??
In reply to Re^2: wait for threads to end in parallel
by ikegami
in thread wait for threads to end in parallel
by pmarcoen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |