@@ -385,9 +385,9 @@ TEST(SyncEvent, WaitForNotifyOne)
385
385
386
386
const steady_clock::duration timeout = seconds_from (5 );
387
387
388
- auto wait_async = [](Condition* cond , Mutex* mutex , const steady_clock::duration& timeout ) {
389
- CUniqueSync cc (*mutex , *cond );
390
- return cc.wait_for (timeout );
388
+ auto wait_async = [](Condition* cv , Mutex* m , const steady_clock::duration& tmo ) {
389
+ CUniqueSync cc (*m , *cv );
390
+ return cc.wait_for (tmo );
391
391
};
392
392
auto wait_async_res = async (launch::async, wait_async, &cond, &mutex, timeout);
393
393
@@ -406,9 +406,9 @@ TEST(SyncEvent, WaitNotifyOne)
406
406
Condition cond;
407
407
cond.init ();
408
408
409
- auto wait_async = [](Condition* cond , Mutex* mutex ) {
410
- UniqueLock lock (*mutex );
411
- return cond ->wait (lock);
409
+ auto wait_async = [](Condition* cv , Mutex* m ) {
410
+ UniqueLock lock (*m );
411
+ return cv ->wait (lock);
412
412
};
413
413
auto wait_async_res = async (launch::async, wait_async, &cond, &mutex);
414
414
@@ -432,9 +432,9 @@ TEST(SyncEvent, WaitForTwoNotifyOne)
432
432
433
433
srt::sync ::atomic<bool > resource_ready (true );
434
434
435
- auto wait_async = [&](Condition* cond , Mutex* mutex , const steady_clock::duration& timeout , int id) {
436
- UniqueLock lock (*mutex );
437
- if (cond ->wait_for (lock, timeout ) && resource_ready)
435
+ auto wait_async = [&](Condition* cv , Mutex* m , const steady_clock::duration& tmo , int id) {
436
+ UniqueLock lock (*m );
437
+ if (cv ->wait_for (lock, tmo ) && resource_ready)
438
438
{
439
439
notified_clients.push_back (id);
440
440
resource_ready = false ;
@@ -536,9 +536,9 @@ TEST(SyncEvent, WaitForTwoNotifyAll)
536
536
cond.init ();
537
537
const steady_clock::duration timeout = seconds_from (3 );
538
538
539
- auto wait_async = [](Condition* cond , Mutex* mutex , const steady_clock::duration& timeout ) {
540
- UniqueLock lock (*mutex );
541
- return cond ->wait_for (lock, timeout );
539
+ auto wait_async = [](Condition* cv , Mutex* m , const steady_clock::duration& tmo ) {
540
+ UniqueLock lock (*m );
541
+ return cv ->wait_for (lock, tmo );
542
542
};
543
543
auto wait_async1_res = async (launch::async, wait_async, &cond, &mutex, timeout);
544
544
auto wait_async2_res = async (launch::async, wait_async, &cond, &mutex, timeout);
@@ -565,9 +565,9 @@ TEST(SyncEvent, WaitForNotifyAll)
565
565
cond.init ();
566
566
const steady_clock::duration timeout = seconds_from (5 );
567
567
568
- auto wait_async = [](Condition* cond , Mutex* mutex , const steady_clock::duration& timeout ) {
569
- UniqueLock lock (*mutex );
570
- return cond ->wait_for (lock, timeout );
568
+ auto wait_async = [](Condition* cv , Mutex* m , const steady_clock::duration& tmo ) {
569
+ UniqueLock lock (*m );
570
+ return cv ->wait_for (lock, tmo );
571
571
};
572
572
auto wait_async_res = async (launch::async, wait_async, &cond, &mutex, timeout);
573
573
0 commit comments