Markopy
Utilizing Markov Models for brute forcing attacks
threadSharedListHandler.h File Reference

Thread-safe wrapper for std::ifstream. More...

#include <string>
#include <fstream>
#include <mutex>
Include dependency graph for threadSharedListHandler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Markov::API::Concurrency::ThreadSharedListHandler
 Simple class for managing shared access to file. More...
 

Namespaces

 Markov
 Namespace for the markov-model related classes. Contains Model, Node and Edge classes.
 
 Markov::API
 Namespace for the MarkovPasswords API.
 
 Markov::API::Concurrency
 Namespace for Concurrency related classes.
 

Detailed Description

Thread-safe wrapper for std::ifstream.

Authors
Ata Hakçıl

Simple class for managing shared access to file. This class maintains the handover of each line from a file to multiple threads.

When two different threads try to read from the same file while reading a line isn't completed, it can have unexpected results. Line might be split, or might be read twice. This class locks the read action on the list until a line is completed, and then proceeds with the handover.

Definition in file threadSharedListHandler.h.