allow providing a callback to uv_messenger_stop to prevent mismatched new/free
This commit is contained in:
@@ -23,9 +23,9 @@ FileSource::FileSource(uv_loop_t *loop_, const std::string &path)
|
||||
|
||||
FileSource::~FileSource() {
|
||||
assert(thread_id == uv_thread_self());
|
||||
uv_messenger_stop(queue);
|
||||
// NOTE: We don't need to delete the messenger since it will be deleted by the
|
||||
// uv_messenger_stop() function.
|
||||
uv_messenger_stop(queue, [](uv_messenger_t *msgr) {
|
||||
delete msgr;
|
||||
});
|
||||
|
||||
util::ptr<BaseRequest> req;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user