Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
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
savoirfairelinux
opendht
Commits
38ca7b85
Unverified
Commit
38ca7b85
authored
7 years ago
by
Adrien Béraud
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #267 from AmarOk1412/cpuusage
scheduler: avoid overflow causing 100% cpu usage
parents
d9f6731d
62bbce76
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/dht_proxy_server.cpp
+4
-1
4 additions, 1 deletion
src/dht_proxy_server.cpp
with
4 additions
and
1 deletion
src/dht_proxy_server.cpp
+
4
−
1
View file @
38ca7b85
...
...
@@ -124,6 +124,9 @@ DhtProxyServer::DhtProxyServer(std::shared_ptr<DhtRunner> dht, in_port_t port ,
while
(
service_
->
is_up
()
and
not
stopListeners
)
{
std
::
unique_lock
<
std
::
mutex
>
lock
(
schedulerLock_
);
auto
next
=
scheduler_
.
run
();
if
(
next
==
time_point
::
max
())
schedulerCv_
.
wait
(
lock
);
else
schedulerCv_
.
wait_until
(
lock
,
next
);
}
});
...
...
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