654 Commits

Author SHA1 Message Date
木头云
4832c47345 test(condition): add comprehensive unit tests for ipc::sync::condition
- Test condition variable construction (default and named)
- Test wait, notify, and broadcast operations
- Test timed wait with timeout and infinite wait
- Test integration with mutex for synchronization
- Test producer-consumer patterns with condition variables
- Test multiple waiters with broadcast
- Test spurious wakeup handling patterns
- Test named condition variable sharing between threads
- Test resource cleanup (clear, clear_storage)
- Test edge cases (after clear, immediate notify)
2025-11-30 04:13:57 +00:00
木头云
6e17ce184b test(semaphore): add comprehensive unit tests for ipc::sync::semaphore
- Test semaphore construction (default and named with count)
- Test wait and post operations
- Test timed wait with various timeout values
- Test producer-consumer patterns
- Test multiple producers and consumers scenarios
- Test concurrent post operations
- Test initial count behavior
- Test named semaphore sharing between threads
- Test resource cleanup (clear, clear_storage)
- Test edge cases (zero timeout, after clear, high frequency)
2025-11-30 04:13:04 +00:00
木头云
b4ad3c69c9 test(mutex): add comprehensive unit tests for ipc::sync::mutex
- Test mutex construction (default and named)
- Test lock/unlock operations
- Test try_lock functionality
- Test timed lock with various timeout values
- Test critical section protection
- Test concurrent access and contention scenarios
- Test inter-thread synchronization with named mutex
- Test resource cleanup (clear, clear_storage)
- Test native handle access
- Test edge cases (reopen, zero timeout, rapid operations)
- Test exception safety of try_lock
2025-11-30 04:12:14 +00:00
木头云
280a21c89a test(shm): add comprehensive unit tests for shared memory
- Test low-level API (acquire, get_mem, release, remove)
- Test reference counting functionality (get_ref, sub_ref)
- Test high-level handle class interface
- Test all handle methods (valid, size, name, get, etc.)
- Test handle lifecycle (construction, move, swap, assignment)
- Test different access modes (create, open, create|open)
- Test detach/attach functionality
- Test multi-handle access to same memory
- Test data persistence across handles
- Test edge cases (large segments, multiple simultaneous handles)
2025-11-30 04:11:13 +00:00
木头云
3d743d57ac test(buffer): add comprehensive unit tests for ipc::buffer
- Test all constructors (default, with destructor, from array, from char)
- Test move semantics and assignment operators
- Test all accessor methods (data, size, empty, get<T>)
- Test conversion methods (to_tuple, to_vector)
- Test comparison operators (==, !=)
- Test edge cases (empty buffers, large buffers, self-assignment)
- Verify destructor callback functionality
2025-11-30 04:10:07 +00:00
木头云
17eaa573ca chore(test): archive existing test cases to test/archive
- Move all existing test files (*.cpp, *.h) to test/archive/
- Rename CMakeLists.txt to CMakeLists.txt.old in archive
- Prepare for comprehensive unit test refactoring
2025-11-30 04:04:10 +00:00
木头云
c5302d00ab
Merge pull request #157 from cscd98/mingw
mingw: use lower case windows.h
2025-11-29 18:25:36 +08:00
Craig Carnell
72c4b5abc4 mingw: use lower case windows.h 2025-11-17 09:56:49 +00:00
木头云
a0c7725a14
Merge pull request #148 from mutouyun/yonker-yk-master
Yonker yk master
2025-05-11 21:40:37 +08:00
mutouyun
a1cdc9a711 In non-broadcast mode, connection tags are only used for counting. 2025-05-10 15:14:39 +08:00
yongke liu
87b1fa4abc Fixed issue 107 and 123, receiver check connection when pop msg failed, and call reconnect function when the connection check result is false 2025-05-09 17:10:07 +08:00
木头云
120d85a2c4
Merge pull request #145 from johnwongx/sync
修复连接槽满判断错误
2025-05-01 11:13:43 +08:00
johnwongx
a6c7c8542f 修复连接槽满判断错误 2025-04-23 13:15:39 +08:00
木头云
fdcc9340be
Update rw_lock.h for #143 2025-04-20 13:58:42 +08:00
木头云
f3bf137668
Merge pull request #139 from aengusjiang/master
acquire 仅open不存在的shm不应该打印错误日志
2025-03-08 15:52:35 +08:00
Aengus.Jiang
7bb5f2e611 Merge branch 'master' of https://github.com/aengusjiang/cpp-ipc 2025-03-07 12:34:38 +08:00
Aengus.Jiang
06d4aec320 posix shm open 失败时如果文件不存在打印log #2 修改逻辑错误 2025-03-07 12:33:42 +08:00
Aengus.Jiang
5c36b1264f posix shm open 失败时如果文件不存在打印log 2025-03-07 11:57:31 +08:00
Aengus.Jiang
d69093462a open的时候不存在共享内存,则返回false,没有必要报错 2025-03-07 11:36:57 +08:00
木头云
df09c22738
Update README.md 2025-02-09 17:00:48 +08:00
mutouyun
2673453e66 Try to fix permission issues under linux 2024-12-01 21:06:06 +08:00
mutouyun
84bb801b6e Try to fix a communication problem caused by different permissions under linux 2024-12-01 19:53:40 +08:00
mutouyun
5e5b347636 Complete the implementation of the clean interface and add unit tests 2024-12-01 19:06:50 +08:00
mutouyun
28fdf17279 Added cleanup interfaces for ipc chan 2024-12-01 17:49:34 +08:00
mutouyun
17dcde92bf Added clear_storage for quieue 2024-12-01 17:49:34 +08:00
mutouyun
ab90437e44 Added a cleanup interface for waiter. 2024-12-01 17:49:34 +08:00
mutouyun
acea9d74da Fix ut 2024-11-17 17:51:18 +08:00
mutouyun
e1f377d7f6 Added a cleanup interface for the synchronization facilities 2024-11-17 17:39:03 +08:00
mutouyun
29678f1d41 Added a cleanup interface for queue 2024-11-17 17:36:09 +08:00
mutouyun
5071fb5db6 Added a cleanup interface for shared memory handles 2024-11-17 17:35:29 +08:00
mutouyun
805490605e refactor: improve emplace construction for shm_data in mutex.h 2024-05-25 17:33:33 +08:00
abathur puppe
025311d5f6 fix emplace construction for shm_data. Previous required copy constructor 2024-05-25 17:32:31 +08:00
winsoft666
035d76d5aa Update CMakeLists.txt 2023-12-10 21:07:18 +08:00
winsoft666
144b2db9ca Add PACKAGE_VERSION 2023-12-10 21:07:18 +08:00
winsoft666
c4280efd5f Add cpp-ipc-targets 2023-12-10 21:07:18 +08:00
mutouyun
ac54be7083 reconnect cannot reconnect when you are out of authority v1.3.0 2023-10-28 16:44:16 +08:00
mutouyun
a3b0a968f8 回滚多余的修改 2023-10-28 16:44:16 +08:00
mutouyun
fafa5e85f7 Fixed memory access exception in multithreading. 2023-10-28 16:44:16 +08:00
mutouyun
c74f78ea08 统一字符串有效性判断 2023-10-28 16:44:16 +08:00
mutouyun
cf72d0293a The global sender could not be obtained due to different prefixes. 2023-10-28 16:44:16 +08:00
mutouyun
fab3f6fffe Add a user interface with a custom name prefix. 2023-10-28 16:44:16 +08:00
mutouyun
16b138d6af Check illegal parameter. 2023-10-28 16:44:16 +08:00
mutouyun
a46773bbd5 微调注释 2023-10-28 16:44:16 +08:00
mutouyun
ec14e81ffd Identify the user group and add the appropriate prefix to the names. 2023-10-28 16:44:16 +08:00
mutouyun
bbd063f965 调整空白格式 2023-10-28 16:44:16 +08:00
mutouyun
0814438c35 调整注释 2023-10-28 16:44:16 +08:00
mutouyun
22a253a72f Supplement similar demo under linux. 2023-10-28 16:44:16 +08:00
mutouyun
e229f78a15 Windows services can communicate with common processes. 2023-10-28 16:44:16 +08:00
mutouyun
7981a1cbc1 disable warning C4858 2023-10-28 16:44:16 +08:00
木头云
6111722534
fix: the receiver of channel will hang after disconnect 2023-05-14 14:11:54 +08:00