rocksdb-native 3.5.6 → 3.5.8

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/CMakeLists.txt CHANGED
@@ -34,6 +34,14 @@ target_link_libraries(
34
34
  path
35
35
  )
36
36
 
37
+ if(target MATCHES "linux")
38
+ target_link_options(
39
+ ${rocksdb_native_bare}
40
+ PUBLIC
41
+ -static-libstdc++
42
+ )
43
+ endif()
44
+
37
45
  add_napi_module(rocksdb_native_napi)
38
46
 
39
47
  target_sources(
@@ -53,6 +61,14 @@ target_link_libraries(
53
61
  path
54
62
  )
55
63
 
64
+ if(target MATCHES "linux")
65
+ target_link_options(
66
+ ${rocksdb_native_napi}
67
+ PUBLIC
68
+ -static-libstdc++
69
+ )
70
+ endif()
71
+
56
72
  resolve_node_module(bare-compat-napi compat)
57
73
 
58
74
  target_include_directories(
package/lib/state.js CHANGED
@@ -234,7 +234,13 @@ module.exports = class RocksDBState extends ReadyResource {
234
234
 
235
235
  async _suspend() {
236
236
  if (this.opened === false) await this.ready()
237
+
238
+ this.io.inc()
239
+
237
240
  if (this._resuming !== null) await this._resuming
241
+
242
+ this.io.dec()
243
+
238
244
  if (this._suspended === true) return
239
245
 
240
246
  while (!this.io.isIdle()) await this.io.idle()
@@ -274,11 +280,13 @@ module.exports = class RocksDBState extends ReadyResource {
274
280
 
275
281
  async _resume() {
276
282
  if (this.opened === false) await this.ready()
277
- if (this._suspending !== null) await this._suspending
278
- if (this._suspended === false) return
279
283
 
280
284
  this.io.inc()
281
285
 
286
+ if (this._suspending !== null) await this._suspending
287
+
288
+ if (this._suspended === false) return this.io.dec()
289
+
282
290
  const req = { resolve: null, reject: null, handle: null }
283
291
 
284
292
  const promise = new Promise((resolve, reject) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rocksdb-native",
3
- "version": "3.5.6",
3
+ "version": "3.5.8",
4
4
  "description": "librocksdb bindings for JavaScript",
5
5
  "exports": {
6
6
  ".": "./index.js",