Introduction
This thread is the release of
Expression parser's dynamic threading library, it provides basic abstractions to perform actions related to threading. These tasks can be everything from starting a thread, to killing, or suspending a thread.
How do I use it?
It's not a difficult process, simply load the plugin (A dynamic library is referred to as a plugin) into your
ep module instance via the constructor, and then import the library like you would import any other library (Hint: use the 'import' keyword).
Here's how you would load the plugin:
Code:
auto module = std::make_shared<ep::module>( ep::load_plugins( "threading.dll" ) );
Altough do take in note, that for it to be able to import it using a relative path (No trailing or leading slashes) the plugin needs to be placed in the same directory as your application.
Here's how you would then import said library:
Take in note that all libraries provided by me will always have the same import name as their filename. (This is however not a requirement for any public releases).
Functions and types?
The
theading library provides the following methods and types:
- thread
- milliseconds
- current_thread( ) [returns the current thread object]
thread
Thread is a type that works around a Win32 thread handle, and provides basic and simple functions to manipulate the thread.
thread containts the following functions:
Code:
thread::thread( ) [constructs a empty thread object]
thread::~thread( ) [destructs the thread object (DOES NOT KILL THE THREAD.)]
thread::thread( &other ) [clones the thread]
thread::start( &func ) [func = string literal, the name of the method]
thread::is_running( ) [returns 1 if the thread is still running]
thread::wait( &milli ) [milli = milliseconds object specifying how many milliseconsd to wait for]
thread::suspend( ) [suspends the thread untill it's resumed again]
thread::resume( ) [resumes the thread from a suspended state]
thread::kill( ) [kills the thread, unsafe but might be useful for some]
thread::sleep( &milli ) [same as wait]
milliseconds
Milliseconds is a type that abstracts a std::chrono::milliseconds type, it provides basic time manipulation.
Milliseconds contains the following functions:
Code:
milliseconds::milliseconds( &milli ) [constructs a millisecond object with milli being an integral]
milliseconsd::~milliseconds( ) [destructs a milliseconds object]
milliseconds::count( ) [returns the amount of milliseconds it stores as an integral]
Sincerely,
Yamiez.
VirusTotal
Updated virus scans:
https://virustotal.com/en/file/8f166...is/1477433428/
https://virusscan.jotti.org/en-US/fi...job/5vth0hnn9j