function AtomicsFutexWaitJS(ia, index, value, timeout) {
  CheckSharedInteger32TypedArray(ia);
  index = ValidateIndex(index, %_TypedArrayGetLength(ia));
  if (IS_UNDEFINED(timeout)) {
    timeout = INFINITY;
  } else {
    timeout = TO_NUMBER(timeout);
    if (NUMBER_IS_NAN(timeout)) {
      timeout = INFINITY;
    } else {
      timeout = MaxSimple(0, timeout);
    }
  }
  return %AtomicsFutexWait(ia, index, value, timeout);
}
function AtomicsFutexWaitJS(ia, index, value, timeout) {
  CheckSharedInteger32TypedArray(ia);
  index = ValidateIndex(index, %_TypedArrayGetLength(ia));
  if (IS_UNDEFINED(timeout)) {
    timeout = INFINITY;
  } else {
    timeout = TO_NUMBER(timeout);
    if (NUMBER_IS_NAN(timeout)) {
      timeout = INFINITY;
    } else {
      timeout = MaxSimple(0, timeout);
    }
  }
  return %AtomicsFutexWait(ia, index, value, timeout);
}
function AtomicsFutexWaitJS ( ia , index , value , timeout ) { CheckSharedInteger32TypedArray ( ia ) ; index = ValidateIndex ( index , % _TypedArrayGetLength ( ia ) ) ; if ( IS_UNDEFINED ( timeout ) ) { timeout = INFINITY ; } else { timeout = TO_NUMBER ( timeout ) ; if ( NUMBER_IS_NAN ( timeout ) ) { timeout = INFINITY ; } else { timeout = MaxSimple ( 0 , timeout ) ; } } return % AtomicsFutexWait ( ia , index , value , timeout ) ; }
Futexes
Futexes