@nxtedition/lib 28.0.14 → 28.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "28.0.14",
3
+ "version": "28.0.16",
4
4
  "license": "UNLICENSED",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",
@@ -92,5 +92,5 @@
92
92
  "pino": ">=7.0.0",
93
93
  "rxjs": "^7.0.0"
94
94
  },
95
- "gitHead": "aabc7444f25c786ad529697241c3e36ffa036143"
95
+ "gitHead": "d86a7bb8926d7fd11cc5723b0664803fb078812b"
96
96
  }
package/sequence.js CHANGED
@@ -287,8 +287,8 @@ export class Sequence {
287
287
  strict &&
288
288
  (other.identity || this.identity) &&
289
289
  other.identity !== this.identity &&
290
- this.#value !== '0' &&
291
- other.#value !== '0'
290
+ this.count !== 0 &&
291
+ other.count !== 0
292
292
  ) {
293
293
  throw Object.assign(new Error('Cannot compare sequences with different identities'), {
294
294
  data: { a: this.toString(), b: other.toString() },
package/shared.js CHANGED
@@ -228,7 +228,7 @@ export function writer({ sharedState, sharedBuffer }, { yield: onYield, logger }
228
228
  }
229
229
 
230
230
  if (readPos === 0) {
231
- readPos = Atomics.load(state, READ_INDEX) | 0
231
+ _yield(0)
232
232
  }
233
233
 
234
234
  // Not enough space at the end. Check if there's space at the beginning.
@@ -259,7 +259,7 @@ export function writer({ sharedState, sharedBuffer }, { yield: onYield, logger }
259
259
  // The only free space is between W and R.
260
260
 
261
261
  if (readPos - writePos < required) {
262
- readPos = Atomics.load(state, READ_INDEX) | 0
262
+ _yield(0)
263
263
  }
264
264
 
265
265
  return readPos - writePos >= required
@@ -375,7 +375,6 @@ export function writer({ sharedState, sharedBuffer }, { yield: onYield, logger }
375
375
  if (!_acquire(len)) {
376
376
  const startTime = performance.now()
377
377
  logger?.warn({ readPos, writePos }, 'yield started')
378
- _yield(0)
379
378
  for (let n = 0; !_acquire(len); n++) {
380
379
  if (performance.now() - startTime > timeout) {
381
380
  throw new Error('Timeout while waiting for space in the buffer')