in reply to Re^5: Parrot, threads & fears for the future.
in thread Parrot, threads & fears for the future.
Each thread could get one item to start with, and as it finishes, it could get an additional item. If it's just running a built-in function on the list, then each thread could be given 1/n of the list (where n is the number of threads). Otherwise, Perl could time the items and detect about how many would be good to send based on the time.
Perl would still need to get data back from the threads to give back to the core, so sending data shouldn't be a problem either. But I've never used threads, so I may be off.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Parrot, threads & fears for the future.
by Jenda (Abbot) on Oct 26, 2006 at 21:57 UTC | |
by AK108 (Friar) on Oct 27, 2006 at 16:34 UTC |