mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 09:52:38 +00:00
16 lines
379 B
C++
16 lines
379 B
C++
#pragma once
|
|
|
|
#include <Common/ThreadPool.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/// High-order function to run callbacks (functions with 'void()' signature) somewhere asynchronously
|
|
using CallbackRunner = std::function<void(std::function<void()>)>;
|
|
|
|
/// Creates CallbackRunner that runs every callback with 'pool->scheduleOrThrow()'
|
|
CallbackRunner threadPoolCallbackRunner(ThreadPool & pool);
|
|
|
|
}
|