From 219d2173c85532daa099fa7c34e41d368ad64323 Mon Sep 17 00:00:00 2001 From: wkcn Date: Mon, 31 Aug 2020 12:13:43 +0800 Subject: [PATCH] add Stop for custom op --- src/operator/custom/custom-inl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/operator/custom/custom-inl.h b/src/operator/custom/custom-inl.h index 1173b14eb2fe..de49e8998519 100644 --- a/src/operator/custom/custom-inl.h +++ b/src/operator/custom/custom-inl.h @@ -204,6 +204,9 @@ class CustomOperator { CustomOperator() { this->Start(); } + ~CustomOperator() { + this->Stop(); + } void ThreadTarget() { std::unique_lock lock(mutex_); while (!q_.empty() || !destructing_) {