mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
adjust code
This commit is contained in:
parent
f09378b481
commit
885abd0c21
@ -155,7 +155,7 @@ void Unit::test_send_recv() {
|
||||
}
|
||||
|
||||
void Unit::test_channel() {
|
||||
auto conn = [](int id) {
|
||||
auto wait_for_connected = [](int id) {
|
||||
std::string ack = "copy:" + std::to_string(id);
|
||||
ipc::channel cc { "my-ipc-channel" };
|
||||
std::atomic_bool unmatched { true };
|
||||
@ -189,11 +189,11 @@ void Unit::test_channel() {
|
||||
};
|
||||
|
||||
std::thread t1 {[&] {
|
||||
auto cc = conn(1);
|
||||
auto cc = wait_for_connected(1);
|
||||
}};
|
||||
|
||||
std::thread t2 {[&] {
|
||||
auto cc = conn(2);
|
||||
auto cc = wait_for_connected(2);
|
||||
}};
|
||||
|
||||
t1.join();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user