mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-07-03 11:53:41 +02:00
common/src/key_search.hpp: Adding getThreadCount()
This commit is contained in:
parent
1d923d3dd8
commit
4a3e7d8fa4
2 changed files with 7 additions and 0 deletions
|
|
@ -69,6 +69,8 @@ public :
|
||||||
|
|
||||||
// Set the number of threads to use while searching.
|
// Set the number of threads to use while searching.
|
||||||
void setThreadCount(size_t num);
|
void setThreadCount(size_t num);
|
||||||
|
|
||||||
|
size_t getThreadCount() const;
|
||||||
#endif /* EOSIOKEYGEN_HAVE_THREADS */
|
#endif /* EOSIOKEYGEN_HAVE_THREADS */
|
||||||
|
|
||||||
// Aborts find() operation if started.
|
// Aborts find() operation if started.
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,11 @@ size_t KeySearch::max_threads()
|
||||||
return std::thread::hardware_concurrency();
|
return std::thread::hardware_concurrency();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t KeySearch::getThreadCount() const
|
||||||
|
{
|
||||||
|
return m_threads;
|
||||||
|
}
|
||||||
|
|
||||||
void KeySearch::_search_mt()
|
void KeySearch::_search_mt()
|
||||||
{
|
{
|
||||||
std::vector<std::thread> t;
|
std::vector<std::thread> t;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue