in reply to Is it possible to perform concurrent action like loop?
Yes...
use threads; foreach (0..5) { async { action like printing some string, or adding two numbers, etc +... }->detach; ## Corrected per [missingthepoint]'s enigmatic post bel +ow! }
See threads, but be aware, the Devil is in the details.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is it possible to perform concurrent action like loop?
by missingthepoint (Friar) on Mar 20, 2009 at 09:11 UTC | |
by BrowserUk (Patriarch) on Mar 20, 2009 at 11:31 UTC | |
by missingthepoint (Friar) on Mar 20, 2009 at 12:07 UTC |