8000 add close() method by mvayngrib · Pull Request #8 · dominictarr/level-manifest · GitHub
[go: up one dir, main page]

Skip to content

add close() method - #8

Open
mvayngrib wants to merge 1 commit into
dominictarr:masterfrom
mvayngrib:master
Open

mvayngrib wants to merge 1 commit into
dominictarr:masterfrom
mvayngrib:master

Conversation

@mvayngrib
Copy link
Copy Markdown

No description provided.

@juliangruber
Copy link
Copy Markdown
Contributor

lgtm

@dominictarr
Copy link
Copy Markdown
Owner

hang on... don't we use close to close the connection on multilevel?

@dominictarr
Copy link
Copy Markdown
Owner

what is the best way to handle this?

@mvayngrib
Copy link
Copy Markdown
Author

hm, does sublevel allow closing the underlying db at all? The close method in sublevel doesn't seem to pass through the close() method

  emitter.close = function (cb) {
    //TODO: deregister all hooks
    process.nextTick(cb || function () {})
  }

EDIT: my bad, didn't know about multilevel, so assumed you meant multi level with sublevel

@dominictarr
Copy link
Copy Markdown
Owner

yeah... it would be okay for the toplevel sublevel to close the db... but it wouldn't make sense for the nested sublevels to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0