michael@0: load(libdir + "parallelarray-helpers.js"); michael@0: michael@0: function testMap() { michael@0: // At least on my machine, this test is successful, whereas michael@0: // `alloc-too-many-objs.js` fails to run in parallel because of michael@0: // issues around GC. michael@0: michael@0: var nums = range(0, 10); michael@0: michael@0: assertParallelModesCommute(["seq", "par"], function(m) { michael@0: print(m.mode+" "+m.expect); michael@0: nums.mapPar(function (v) { michael@0: var x = []; michael@0: for (var i = 0; i < 45000; i++) { michael@0: x[i] = {from: v}; michael@0: } michael@0: return x; michael@0: }, m) michael@0: }); michael@0: } michael@0: michael@0: if (getBuildConfiguration().parallelJS) michael@0: testMap(); michael@0: