tracker issue : CF-4198519

select a category, or use search below
(searches all categories and all time range)
Title:

Add parallelism to xEach() functions and loops

| View in Tracker

Status/Resolution/Reason: To Test//Fixed

Reporter/Name(from Bugbase): Luis Majano / Luis Majano ()

Created: 04/13/2017

Components: Language

Versions: 2016

Failure Type: Others

Found In Build/Fixed In Build: /

Priority/Frequency: Normal /

Locale/System: / Linux All

Vote Count: 5

Add the ability to add parallel flags to xEach() functions and loop constructs. This has existed in Lucee since the railo days. You can see example here: http://cfdocs.org/arrayeach

letters = ["a","b","c","d"]; 
arrayEach(letters, function(element,index) 
 {
    writeOutput("#index#:#element#;");
}, true, 3 );

Basically you receive two extra arguments:
- parallel:boolean to run the loop in parallel threads
- maxthreads:numeric max number of threads to execute the loop in parallel

Attachments:

Comments:

This is a great feature to speed up performance for an operation that needs performed on a collection, but doesn't need to be done serially. Please copy the Lucee precedent though so frameworks can use it in the future across both engines.
Comment by Bradley W.
937 | April 13, 2017 04:38:40 PM GMT
+1
Vote by John W.
938 | April 13, 2017 04:40:03 PM GMT