summaryrefslogtreecommitdiff
path: root/threads.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-12-11 14:17:29 +0100
committerjmoenig <jens@moenig.org>2014-12-11 14:17:29 +0100
commit0a239b703c8c7fde5540ce63c4236522a22ee049 (patch)
tree0ac4cb31c241ee14f8c30f7c672e508bc4586e01 /threads.js
parent8338384bf572beb06ebd12a0c9af18029e99262a (diff)
downloadsnap-byow-0a239b703c8c7fde5540ce63c4236522a22ee049.tar.gz
snap-byow-0a239b703c8c7fde5540ce63c4236522a22ee049.zip
yield after each cycle in the experimental “forEach” primitive
thanks, Bernat, for reporting this bug!
Diffstat (limited to 'threads.js')
-rw-r--r--threads.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/threads.js b/threads.js
index c21375e..b80ee9e 100644
--- a/threads.js
+++ b/threads.js
@@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/
// Global stuff ////////////////////////////////////////////////////////
-modules.threads = '2014-December-04';
+modules.threads = '2014-December-11';
var ThreadManager;
var Process;
@@ -1695,6 +1695,7 @@ Process.prototype.doForEach = function (upvar, list, script) {
);
if (index > list.length()) {return; }
this.context.inputs[3] += 1;
+ this.pushContext('doYield');
this.pushContext();
this.evaluate(script, new List(), true);
};