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

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

Include dependency graph for threadSharedListHandler.cpp:

Go to the source code of this file.

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.cpp.