mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #15999 from ClickHouse/fix-after-15437
Continuation of 15437
This commit is contained in:
commit
939d8edf33
@ -164,7 +164,8 @@ public:
|
||||
func = std::forward<Function>(func),
|
||||
args = std::make_tuple(std::forward<Args>(args)...)]() mutable /// mutable is needed to destroy capture
|
||||
{
|
||||
SCOPE_EXIT(state->set());
|
||||
auto event = std::move(state);
|
||||
SCOPE_EXIT(event->set());
|
||||
|
||||
/// This moves are needed to destroy function and arguments before exit.
|
||||
/// It will guarantee that after ThreadFromGlobalPool::join all captured params are destroyed.
|
||||
|
Loading…
Reference in New Issue
Block a user