Commit 0400c168 authored by Mathieu Valois's avatar Mathieu Valois
Browse files

Move generate_stats_thread

parent 8f93fafb
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -146,6 +146,12 @@ public:
	inline bool allStarted() const { return started; }
	bool operator==(const Statsgen& other) const;

	/**
	* @brief Given parameters in threadarg, compute statistics on partition of the file
	* @param threadarg : parameters and result storage
	*/
	static void* generate_stats_thread(void * threadarg);

private:
	std::string filename;
	// results of the computation
@@ -198,11 +204,6 @@ private:
 */
void updateMinMax(minMax & minMaxValue, const Policy & pol);

/**
* @brief Action of all threads
* @param threadarg : all useful argument for the thread
*/
void * generate_stats_thread(void * threadarg);

/**
 * @brief Compute statistics by consumming password from a queue
+1 −1
Original line number Diff line number Diff line
@@ -260,7 +260,7 @@ void handle_password(const string& password, const uint64_t& nbPasswords, Thread
	my_data->minMaxValue.updateMinMax(c.pol);
}

void* generate_stats_thread(void* threadarg) {
void* Statsgen::generate_stats_thread(void* threadarg) {
	ThreadData* my_data = (ThreadData *) threadarg;

	ifstream readfile(my_data->filename);