Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
miniob
提交
3df212a3
M
miniob
项目概览
oceanbase
/
miniob
大约 1 年 前同步成功
通知
74
Star
1521
Fork
537
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
分析
仓库
DevOps
项目成员
Pages
M
miniob
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
3df212a3
编写于
9月 16, 2022
作者:
F
FrankXMX
提交者:
GitHub
9月 16, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加线程名称,便于调试。 (#79)
* stage线程分配问题 #75 * 设置线程名称,在top时显示线程名,便于调试
上级
2cf120ab
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
5 addition
and
0 deletion
+5
-0
deps/common/seda/thread_pool.cpp
deps/common/seda/thread_pool.cpp
+3
-0
deps/common/seda/timer_stage.cpp
deps/common/seda/timer_stage.cpp
+2
-0
未找到文件。
deps/common/seda/thread_pool.cpp
浏览文件 @
3df212a3
...
...
@@ -107,6 +107,9 @@ unsigned int Threadpool::add_threads(unsigned int threads)
LOG_WARN
(
"Failed to create one thread
\n
"
);
break
;
}
char
tmp
[
16
]
=
{};
snprintf
(
tmp
,
sizeof
(
tmp
),
"%s%u"
,
name_
.
c_str
(),
i
);
pthread_setname_np
(
pthread
,
tmp
);
}
nthreads_
+=
i
;
MUTEX_UNLOCK
(
&
thread_mutex_
);
...
...
deps/common/seda/timer_stage.cpp
浏览文件 @
3df212a3
...
...
@@ -295,6 +295,8 @@ bool TimerStage::initialize()
int
status
=
pthread_create
(
&
timer_thread_id_
,
thread_attrs
,
&
TimerStage
::
start_timer_thread
,
thread_args
);
if
(
status
!=
0
)
LOG_ERROR
(
"failed to create timer thread: status=%d
\n
"
,
status
);
else
pthread_setname_np
(
timer_thread_id_
,
"TimerStage"
);
return
(
status
==
0
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录