Comparing version 3.0.13 to 3.0.14
{ | ||
"name": "lmdb", | ||
"author": "Kris Zyp", | ||
"version": "3.0.13", | ||
"version": "3.0.14", | ||
"description": "Simple, efficient, scalable, high-performance LMDB interface", | ||
@@ -114,9 +114,9 @@ "license": "MIT", | ||
"optionalDependencies": { | ||
"@lmdb/lmdb-darwin-arm64": "3.0.13", | ||
"@lmdb/lmdb-darwin-x64": "3.0.13", | ||
"@lmdb/lmdb-linux-arm": "3.0.13", | ||
"@lmdb/lmdb-linux-arm64": "3.0.13", | ||
"@lmdb/lmdb-linux-x64": "3.0.13", | ||
"@lmdb/lmdb-win32-x64": "3.0.13" | ||
"@lmdb/lmdb-darwin-arm64": "3.0.14", | ||
"@lmdb/lmdb-darwin-x64": "3.0.14", | ||
"@lmdb/lmdb-linux-arm": "3.0.14", | ||
"@lmdb/lmdb-linux-arm64": "3.0.14", | ||
"@lmdb/lmdb-linux-x64": "3.0.14", | ||
"@lmdb/lmdb-win32-x64": "3.0.14" | ||
} | ||
} |
@@ -184,3 +184,3 @@ export const SKIP = {}; | ||
}, | ||
return() { | ||
return(value) { | ||
if (!this.done) { | ||
@@ -187,0 +187,0 @@ RETURN_DONE.value = value; |
18
write.js
@@ -32,2 +32,3 @@ import { | ||
const PROMISE_SUCCESS = Promise.resolve(true); | ||
const arch = process.arch; | ||
export const ABORT = 4.452694326329068e-106; // random/unguessable numbers, which work across module/versions and native | ||
@@ -359,8 +360,15 @@ export const IF_EXISTS = 3.542694326329068e-103; | ||
if (writtenBatchDepth) { | ||
// if we are in a batch, the transaction can't close, so we do the faster, | ||
// If we are in a batch, the transaction can't close, so we do the faster, | ||
// but non-deterministic updates, knowing that the write thread can | ||
// just poll for the status change if we miss a status update | ||
writeStatus = uint32[flagPosition]; | ||
uint32[flagPosition] = flags; | ||
//writeStatus = Atomics.or(uint32, flagPosition, flags) | ||
// just poll for the status change if we miss a status update. | ||
// That is, if we are on x64 architecture... | ||
if (arch === 'x64') { | ||
writeStatus = uint32[flagPosition]; | ||
uint32[flagPosition] = flags; | ||
} else { | ||
// However, on ARM processors, apparently more radical memory reordering can occur | ||
// so we need to use the slower atomic operation to ensure that a memory barrier is set | ||
// and that the value pointer is actually written before the flag is updated | ||
writeStatus = Atomics.or(uint32, flagPosition, flags); | ||
} | ||
if (writeBatchStart && !writeStatus) { | ||
@@ -367,0 +375,0 @@ outstandingBatchCount += 1 + (valueSize >> 12); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2515671
7707