You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by ja...@apache.org on 2020/06/15 05:35:15 UTC
[incubator-brpc] branch master updated: timer_thread: remove
redundant code
This is an automated email from the ASF dual-hosted git repository.
jamesge pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git
The following commit(s) were added to refs/heads/master by this push:
new 0144ddc timer_thread: remove redundant code
new e5bd064 Merge pull request #1137 from lorinlee/timer
0144ddc is described below
commit 0144ddc733dfd25ad23ba23e25156947a6e1fd42
Author: LorinLee <lo...@gmail.com>
AuthorDate: Mon Jun 15 01:12:03 2020 +0800
timer_thread: remove redundant code
---
src/bthread/timer_thread.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/bthread/timer_thread.cpp b/src/bthread/timer_thread.cpp
index 5010206..8d85b63 100644
--- a/src/bthread/timer_thread.cpp
+++ b/src/bthread/timer_thread.cpp
@@ -406,9 +406,7 @@ void TimerThread::run() {
// The realtime to wait for.
int64_t next_run_time = std::numeric_limits<int64_t>::max();
- if (tasks.empty()) {
- next_run_time = std::numeric_limits<int64_t>::max();
- } else {
+ if (!tasks.empty()) {
next_run_time = tasks[0]->run_time;
}
// Similarly with the situation before running tasks, we check
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org