@@ -51,12 +51,12 @@ fn test_try_lock_rwmutex() {
51
51
52
52
mx.unlock ()
53
53
54
- // try_rlock will always sucess when mx unlocked,
54
+ // try_rlock will always succeed when mx unlocked,
55
55
// multiple try_rlock can apply to the same mx
56
- try_sucess_reading2 := mx.try_rlock ()
57
- try_sucess_reading3 := mx.try_rlock ()
58
- assert try_sucess_reading2 == true
59
- assert try_sucess_reading3 == true
56
+ try_success_reading2 := mx.try_rlock ()
57
+ try_success_reading3 := mx.try_rlock ()
58
+ assert try_success_reading2 == true
59
+ assert try_success_reading3 == true
60
60
61
61
// if mx is rlocked, then the try_wlock will fail
62
62
try_fail_writing2 := mx.try_wlock ()
@@ -65,10 +65,10 @@ fn test_try_lock_rwmutex() {
65
65
mx.runlock ()
66
66
mx.runlock () // you must release rlock mutiple times, as it was rlocked multiple times
67
67
68
- // after mx release all rlock, try_wlock will sucess
69
- try_sucess_writing3 := mx.try_wlock ()
70
- assert try_sucess_writing3 == true
68
+ // after mx release all rlock, try_wlock will succeed
69
+ try_success_writing3 := mx.try_wlock ()
70
+ assert try_success_writing3 == true
71
71
72
- mx.unlock () // you must unlock it, after try_wlock sucess
72
+ mx.unlock () // you must unlock it, after try_wlock success
73
73
mx.destroy ()
74
74
}
0 commit comments