mirror of
https://github.com/PurpleI2P/i2pd-tools.git
synced 2025-03-22 09:00:30 +01:00
vanitygen output formatted with mutex
This commit is contained in:
parent
9618b20939
commit
3f59de5e73
1 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
#include "vanity.hpp"
|
#include "vanity.hpp"
|
||||||
#include<regex>
|
#include <regex>
|
||||||
#include<getopt.h>
|
#include <mutex>
|
||||||
|
#include <getopt.h>
|
||||||
|
|
||||||
|
|
||||||
static struct
|
static struct
|
||||||
|
@ -124,6 +125,7 @@ static inline bool NotThat(const char * a, const char *b)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::mutex mtx;
|
||||||
static inline bool thread_find(uint8_t * buf, const char * prefix, int id_thread, unsigned long long throughput)
|
static inline bool thread_find(uint8_t * buf, const char * prefix, int id_thread, unsigned long long throughput)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -131,7 +133,9 @@ static inline bool thread_find(uint8_t * buf, const char * prefix, int id_thread
|
||||||
* For idea and example ^-^
|
* For idea and example ^-^
|
||||||
* Orignal is sensei of crypto ;)
|
* Orignal is sensei of crypto ;)
|
||||||
*/
|
*/
|
||||||
|
mtx.lock();
|
||||||
std::cout << "Thread " << id_thread << " binded" << std::endl;
|
std::cout << "Thread " << id_thread << " binded" << std::endl;
|
||||||
|
mtx.unlock();
|
||||||
/*
|
/*
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue