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:
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.
|
||||
void setThreadCount(size_t num);
|
||||
|
||||
size_t getThreadCount() const;
|
||||
#endif /* EOSIOKEYGEN_HAVE_THREADS */
|
||||
|
||||
// Aborts find() operation if started.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue