Skip to content
Snippets Groups Projects
Unverified Commit 68d549b8 authored by Joakim Skogø Langvand's avatar Joakim Skogø Langvand Committed by GitHub
Browse files

Create README.md

parent 81a5a218
No related branches found
No related tags found
No related merge requests found
# Event loop and worker thread
Usage:
cd build
cmake ..
cmake --build .
./eventloop
The Workers class has two constructors. The default constructor (no arguments) returns an instance utilising a single thread,
or rather, it runs one task at a time in the order the tasks were added to the queue. This makes the instance act as an event loop.
The other constructor takes one argument, giving the number of concurrent threads to use. Order of execution is not guaranteed.
The `post_timeout([](), int timeout)` method is nonblocking, and places the task in a separate queue before adding it to the main
queue after the timeout.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment