You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by ww...@apache.org on 2022/07/22 03:54:01 UTC
[incubator-brpc] branch master updated: Fixing compilation in rpc_press, and fixing typo in execution-queue (#1846)
This is an automated email from the ASF dual-hosted git repository.
wwbmmm 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 4a2e029c Fixing compilation in rpc_press, and fixing typo in execution-queue (#1846)
4a2e029c is described below
commit 4a2e029ce820cf4899b402cd08f1a10d8711d426
Author: mwish <ma...@gmail.com>
AuthorDate: Fri Jul 22 11:53:56 2022 +0800
Fixing compilation in rpc_press, and fixing typo in execution-queue (#1846)
---
src/bthread/execution_queue.cpp | 4 ++--
src/bthread/execution_queue.h | 2 +-
src/bthread/execution_queue_inl.h | 2 +-
tools/rpc_press/rpc_press_impl.cpp | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/bthread/execution_queue.cpp b/src/bthread/execution_queue.cpp
index 569698b2..6461fef9 100644
--- a/src/bthread/execution_queue.cpp
+++ b/src/bthread/execution_queue.cpp
@@ -72,7 +72,7 @@ void ExecutionQueueBase::start_execute(TaskNode* node) {
if (node->high_priority) {
// Add _high_priority_tasks before pushing this task into queue to
// make sure that _execute_tasks sees the newest number when this
- // task is in the queue. Althouth there might be some useless for
+ // task is in the queue. Although there might be some useless for
// loops in _execute_tasks if this thread is scheduled out at this
// point, we think it's just fine.
_high_priority_tasks.fetch_add(1, butil::memory_order_relaxed);
@@ -321,7 +321,7 @@ ExecutionQueueBase::scoped_ptr_t ExecutionQueueBase::address(uint64_t id) {
// We don't return m immediatly when the reference count
// reaches 0 as there might be in processing tasks. Instead
// _on_recycle would push a `stop_task', after which
- // is excuted m would be finally reset and returned
+ // is executed m would be finally reset and returned
}
} else {
CHECK(false) << "ref-version=" << ver1
diff --git a/src/bthread/execution_queue.h b/src/bthread/execution_queue.h
index 61cb99eb..83ebaf59 100644
--- a/src/bthread/execution_queue.h
+++ b/src/bthread/execution_queue.h
@@ -198,7 +198,7 @@ int execution_queue_execute(ExecutionQueueId<T> id,
const TaskOptions* options,
TaskHandle* handle);
-// [Thread safe and ABA free] Cancel the corrosponding task.
+// [Thread safe and ABA free] Cancel the corresponding task.
// Returns:
// -1: The task was executed or h is an invalid handle
// 0: Success
diff --git a/src/bthread/execution_queue_inl.h b/src/bthread/execution_queue_inl.h
index 7911db65..20fdab24 100644
--- a/src/bthread/execution_queue_inl.h
+++ b/src/bthread/execution_queue_inl.h
@@ -520,7 +520,7 @@ inline int ExecutionQueueBase::dereference() {
_on_recycle();
// We don't return m immediatly when the reference count
// reaches 0 as there might be in processing tasks. Instead
- // _on_recycle would push a `stop_task' after which is excuted
+ // _on_recycle would push a `stop_task' after which is executed
// m would be finally returned and reset
return 1;
}
diff --git a/tools/rpc_press/rpc_press_impl.cpp b/tools/rpc_press/rpc_press_impl.cpp
index 8a873eff..3ae85fe4 100644
--- a/tools/rpc_press/rpc_press_impl.cpp
+++ b/tools/rpc_press/rpc_press_impl.cpp
@@ -222,7 +222,7 @@ void RpcPress::sync_client() {
int64_t last_expected_time = butil::monotonic_time_ns();
const int64_t interval = (int64_t) (1000000000L / req_rate);
// the max tolerant delay between end_time and expected_time. 10ms or 10 intervals
- int64_t max_tolerant_delay = std::max(10000000L, 10 * interval);
+ int64_t max_tolerant_delay = std::max((int64_t) 10000000L, 10 * interval);
while (!_stop) {
brpc::Controller* cntl = new brpc::Controller;
msg_index = (msg_index + _options.test_thread_num) % _msgs.size();
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org