1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-06-17 03:50:03 +02:00

common/src/key_search.hpp: Adding getThreadCount()

This commit is contained in:
Henrik Hautakoski 2022-09-20 17:45:55 +02:00
parent 1d923d3dd8
commit 4a3e7d8fa4
2 changed files with 7 additions and 0 deletions

View file

@ -69,6 +69,8 @@ public :
// Set the number of threads to use while searching.
void setThreadCount(size_t num);
size_t getThreadCount() const;
#endif /* EOSIOKEYGEN_HAVE_THREADS */
// Aborts find() operation if started.

View file

@ -73,6 +73,11 @@ size_t KeySearch::max_threads()
return std::thread::hardware_concurrency();
}
size_t KeySearch::getThreadCount() const
{
return m_threads;
}
void KeySearch::_search_mt()
{
std::vector<std::thread> t;