Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf73a98e

Browse files
author
geraltyang
committed
mutex bug
1 parent55d1710 commitf73a98e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎inc/behaviac/common/logger/logmanager.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ namespace behaviac {
9898
Logs_tm_logs;
9999
constchar*m_logFilePath;
100100
static LogManager*ms_instance;
101+
classbehaviac::Mutex mutex_;
101102
};
102103
}//namespace behaviac
103104

‎src/common/logger/logmanager.cpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ namespace behaviac {
117117
//printf(buffer.c_str());
118118

119119
if (fp) {
120-
behaviac::Mutex cs;
121-
behaviac::ScopedLocklock(cs);
120+
behaviac::ScopedLocklock(mutex_);
122121

123122
fwrite(buffer,1,strlen(buffer), fp);
124123

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp