field changes to barrier

This commit is contained in:
David St-Onge 2017-05-15 15:08:36 -04:00
parent f4cce4fcd9
commit 1920f86326
7 changed files with 2 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -93,10 +93,11 @@ function barrier_ready() {
WAIT_TIMEOUT = 200 WAIT_TIMEOUT = 200
timeW=0 timeW=0
function barrier_wait(threshold, transf) { function barrier_wait(threshold, transf) {
barrier.put(id, 1)
barrier.get(id) barrier.get(id)
CURSTATE = "BARRIERWAIT" CURSTATE = "BARRIERWAIT"
if(barrier.size() >= threshold) { if(barrier.size() >= threshold) {
barrier = nil # barrier = nil
transf() transf()
} else if(timeW>=WAIT_TIMEOUT) { } else if(timeW>=WAIT_TIMEOUT) {
barrier = nil barrier = nil

Binary file not shown.

Binary file not shown.