Closed vweevers closed 2 years ago
Ouch: I wondered why tests are passing in Node 12 (I didn't expect it to, for lack of AbortController
). Turns out, they aren't passing, but the exit code is 0. Must be a bug in faucet
which was recently updated.
Now comes the fun part: using promises in the C++ of classic-level
.
Edit: that's surprisingly easy (at least for basic methods like put()
) and performance is roughly the same. No blockers :)
Applies to both the public and private API. If you were already using promises in the public API, nothing changed, except for subtle timing differences. In the private API, it means that function signatures like
_get(key, options, callback)
have changed toasync _get(key, options)
.In addition:
iterator.end()
alias of.close()
because we'd otherwise have to keep callback support on this one method.process.nextTick()
withqueueMicrotask()
because there isn't a better time to introduce timing differencesAbortSignal
on iterators (not functional yet). I'll probably implement (and explain) this in a follow-up PR.TODO:
memory-level
classic-level
(just 2 or 3 methods)Benchmark(later)