Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Network Programming assignment 4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joakim Skogø Langvand
Network Programming assignment 4
Commits
68d549b8
Unverified
Commit
68d549b8
authored
4 years ago
by
Joakim Skogø Langvand
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Create README.md
parent
81a5a218
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+16
-0
16 additions, 0 deletions
README.md
with
16 additions
and
0 deletions
README.md
0 → 100644
+
16
−
0
View file @
68d549b8
# 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.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment