[PR #410] [MERGED] Use standard mutex APIs instead of the home-grown wrapper #1628

Closed
opened 2026-05-05 07:58:00 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/debauchee/barrier/pull/410
Author: @p12tic
Created: 8/22/2019
Status: Merged
Merged: 8/22/2019
Merged by: @AdrianKoshka

Base: masterHead: use-std-mutex


📝 Commits (7)

  • f71c685 Use std::mutex instead of ArchMutex in ArchMultithreadPosix
  • 9df4741 Use std::mutex instead of ArchMutex in EventQueue
  • d9d3904 Use std::mutex instead of ArchMutex in Log
  • 36f3235 Use std::mutex instead of ArchMutex in IpcServer
  • 93c04bb Use std::mutex instead of ArchMutex in IpcClientProxy
  • 83d0639 Use std::mutex instead of ArchMutex in IpcLogOutputter
  • b0e415d Fix race condition in IArchString

📊 Changes

13 files changed (+124 additions, -151 deletions)

View changed files

📝 src/lib/arch/IArchString.cpp (+7 -19)
📝 src/lib/arch/unix/ArchMultithreadPosix.cpp (+56 -62)
📝 src/lib/arch/unix/ArchMultithreadPosix.h (+2 -1)
📝 src/lib/base/EventQueue.cpp (+11 -13)
📝 src/lib/base/EventQueue.h (+2 -3)
📝 src/lib/base/Log.cpp (+6 -10)
📝 src/lib/base/Log.h (+2 -1)
📝 src/lib/ipc/IpcClientProxy.cpp (+7 -12)
📝 src/lib/ipc/IpcClientProxy.h (+4 -2)
📝 src/lib/ipc/IpcLogOutputter.cpp (+5 -9)
📝 src/lib/ipc/IpcLogOutputter.h (+3 -2)
📝 src/lib/ipc/IpcServer.cpp (+17 -16)
📝 src/lib/ipc/IpcServer.h (+2 -1)

📄 Description

This PR replaces some usages of the ArchMutex class with the standard std::mutex. This is the first part of an attempt to replace the internal threading library with the standard alternatives. Some of the APIs are strange and error-prone, it is a kind of tech-debt that is best fixed. The bonus point is that we won't need to maintain all the extra code.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/debauchee/barrier/pull/410 **Author:** [@p12tic](https://github.com/p12tic) **Created:** 8/22/2019 **Status:** ✅ Merged **Merged:** 8/22/2019 **Merged by:** [@AdrianKoshka](https://github.com/AdrianKoshka) **Base:** `master` ← **Head:** `use-std-mutex` --- ### 📝 Commits (7) - [`f71c685`](https://github.com/debauchee/barrier/commit/f71c68506ed64c7c10ec61cfa9f5653888120bb7) Use std::mutex instead of ArchMutex in ArchMultithreadPosix - [`9df4741`](https://github.com/debauchee/barrier/commit/9df4741748fcd4ff3044a2f557fc0bbf2e36ea1e) Use std::mutex instead of ArchMutex in EventQueue - [`d9d3904`](https://github.com/debauchee/barrier/commit/d9d39040ae783a99980ca11d53751e27f5780508) Use std::mutex instead of ArchMutex in Log - [`36f3235`](https://github.com/debauchee/barrier/commit/36f3235f5124f1ea90c6b0c5f697bc15a248a42b) Use std::mutex instead of ArchMutex in IpcServer - [`93c04bb`](https://github.com/debauchee/barrier/commit/93c04bb2fabc3a194d84b26ff45fa087bd20b478) Use std::mutex instead of ArchMutex in IpcClientProxy - [`83d0639`](https://github.com/debauchee/barrier/commit/83d0639230689a64d285735fe86cd6c9c85de838) Use std::mutex instead of ArchMutex in IpcLogOutputter - [`b0e415d`](https://github.com/debauchee/barrier/commit/b0e415de03d3a7b6379712cbd169ea8e41dddcc0) Fix race condition in IArchString ### 📊 Changes **13 files changed** (+124 additions, -151 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/arch/IArchString.cpp` (+7 -19) 📝 `src/lib/arch/unix/ArchMultithreadPosix.cpp` (+56 -62) 📝 `src/lib/arch/unix/ArchMultithreadPosix.h` (+2 -1) 📝 `src/lib/base/EventQueue.cpp` (+11 -13) 📝 `src/lib/base/EventQueue.h` (+2 -3) 📝 `src/lib/base/Log.cpp` (+6 -10) 📝 `src/lib/base/Log.h` (+2 -1) 📝 `src/lib/ipc/IpcClientProxy.cpp` (+7 -12) 📝 `src/lib/ipc/IpcClientProxy.h` (+4 -2) 📝 `src/lib/ipc/IpcLogOutputter.cpp` (+5 -9) 📝 `src/lib/ipc/IpcLogOutputter.h` (+3 -2) 📝 `src/lib/ipc/IpcServer.cpp` (+17 -16) 📝 `src/lib/ipc/IpcServer.h` (+2 -1) </details> ### 📄 Description This PR replaces some usages of the `ArchMutex` class with the standard `std::mutex`. This is the first part of an attempt to replace the internal threading library with the standard alternatives. Some of the APIs are strange and error-prone, it is a kind of tech-debt that is best fixed. The bonus point is that we won't need to maintain all the extra code. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 07:58:00 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#1628
No description provided.