Added a close method to lib/core.js (the top-level close currently fails).
Requires adding a destroy method to the mutex, which either gracefully waits for pending tasks to complete (the default behavior), or will eagerly reject them if an error is provided.
Since Hypercore.close() does not currently accept an err parameter, the eager destroy is unused, but this might be added later.
Added a
close
method tolib/core.js
(the top-levelclose
currently fails).Requires adding a
destroy
method to the mutex, which either gracefully waits for pending tasks to complete (the default behavior), or will eagerly reject them if an error is provided.Since
Hypercore.close()
does not currently accept anerr
parameter, the eager destroy is unused, but this might be added later.