in reply to Re: wait for threads to end in parallel
in thread wait for threads to end in parallel
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??
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: wait for threads to end in parallel
by BrowserUk (Patriarch) on Mar 16, 2010 at 16:31 UTC | |
by ikegami (Patriarch) on Mar 16, 2010 at 16:47 UTC | |
by BrowserUk (Patriarch) on Mar 16, 2010 at 17:11 UTC | |
by ikegami (Patriarch) on Mar 16, 2010 at 18:09 UTC |