Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 65f7fec

Browse files
committed
rename global lock
1 parent 3a0f6c7 commit 65f7fec

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

fml/raster_thread_merger.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void RasterThreadMerger::MergeWithLease(size_t lease_term) {
7979

8080
// To avoid data races between the platform thread posting sync tasks to the
8181
// raster thread and the raster thread merging, we add a lock here.
82-
std::scoped_lock lock{mutex_, gThreadMergingLock};
82+
std::scoped_lock lock{mutex_, g_thread_merging_lock};
8383
bool success = shared_merger_->MergeWithLease(this, lease_term);
8484
if (success && merge_unmerge_callback_ != nullptr) {
8585
merge_unmerge_callback_();

fml/task_runner.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
namespace fml {
1818

19-
std::mutex gThreadMergingLock;
19+
std::mutex g_thread_merging_lock;
2020

2121
TaskRunner::TaskRunner(fml::RefPtr<MessageLoopImpl> loop)
2222
: loop_(std::move(loop)) {}
@@ -66,7 +66,7 @@ void TaskRunner::RunNowOrPostTask(fml::RefPtr<fml::TaskRunner> runner,
6666

6767
void TaskRunner::RunNowOrPostSyncTask(fml::RefPtr<fml::TaskRunner> runner,
6868
const fml::closure& task) {
69-
std::scoped_lock lock(gThreadMergingLock);
69+
std::scoped_lock lock(g_thread_merging_lock);
7070
RunNowOrPostTask(runner, task);
7171
}
7272
} // namespace fml

fml/task_runner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class MessageLoopImpl;
1818

1919
/// To avoid data races between the platform thread posting sync tasks to the
2020
/// raster thread and the raster thread merging.
21-
extern std::mutex gThreadMergingLock;
21+
extern std::mutex g_thread_merging_lock;
2222

2323
/// An interface over the ability to schedule tasks on a \p TaskRunner.
2424
class BasicTaskRunner {

0 commit comments

Comments
 (0)