How to use the barrier function from bindings

Find comprehensive JavaScript bindings.barrier code examples handpicked from public code repositorys.

400
401
402
403
404
405
406
407
408
409
function EMSbarrier(timeout) {
    if (EMSglobal.inParallelContext) {
        if(typeof timeout === "undefined") {
            timeout = 500000;  // TODO: Magic number -- long enough for errors, not load imbalance
        }
        var remaining_time = EMS.barrier.call(EMSglobal, timeout);
        if (remaining_time < 0) {
            console.log("EMSbarrier: ERROR -- Barrier timed out after", timeout, "iterations.");
            // TODO: Probably should throw an error
        }
fork icon40
star icon590
watch icon0

+ 10 other calls in file

399
400
401
402
403
404
405
406
407
408
function EMSbarrier(timeout) {
    if (EMSglobal.inParallelContext) {
        if(typeof timeout === "undefined") {
            timeout = 500000;  // TODO: Magic number -- long enough for errors, not load imbalance
        }
        var remaining_time = EMS.barrier(timeout);
        if (remaining_time < 0) {
            console.log("EMSbarrier: ERROR -- Barrier timed out after", timeout, "iterations.");
            // TODO: Probably should throw an error
        }
fork icon0
star icon1
watch icon0

+ 7 other calls in file

Other functions in bindings

Sorted by popularity

function icon

bindings.createKey is the most popular function in bindings (8616 examples)