2022-12-24 23:49:50 +00:00
|
|
|
// Copyright (c) 2021-2022 The Bitcoin Core developers
|
2021-04-13 20:44:46 +03:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
#ifndef BITCOIN_UTIL_THREAD_H
|
|
|
|
#define BITCOIN_UTIL_THREAD_H
|
|
|
|
|
|
|
|
#include <functional>
|
2022-08-31 16:30:35 +01:00
|
|
|
#include <string>
|
2021-04-13 20:44:46 +03:00
|
|
|
|
|
|
|
namespace util {
|
|
|
|
/**
|
|
|
|
* A wrapper for do-something-once thread functions.
|
|
|
|
*/
|
2022-08-31 16:30:35 +01:00
|
|
|
void TraceThread(std::string_view thread_name, std::function<void()> thread_func);
|
2021-04-13 20:44:46 +03:00
|
|
|
|
|
|
|
} // namespace util
|
|
|
|
|
|
|
|
#endif // BITCOIN_UTIL_THREAD_H
|