@@ -41,7 +41,7 @@ typedef enum {
41
41
42
42
// Lock used in all the tests
43
43
emscripten_lock_t testLock = EMSCRIPTEN_LOCK_T_STATIC_INITIALIZER ;
44
- // Which test is running (sometimes in the worklet, sometimes in the main thread )
44
+ // Which test is running (sometimes in the worklet, sometimes in the worker )
45
45
_Atomic Test whichTest = TEST_NOT_STARTED ;
46
46
// Time at which the test starts taken in main()
47
47
double startTime = 0 ;
@@ -81,7 +81,7 @@ bool ProcessAudio(int numInputs, const AudioSampleFrame *inputs, int numOutputs,
81
81
whichTest = TEST_WAIT_ACQUIRE ;
82
82
break ;
83
83
case TEST_WAIT_ACQUIRE :
84
- // Will get unlocked in main thread , so should quickly acquire
84
+ // Will get unlocked in worker , so should quickly acquire
85
85
result = emscripten_lock_busyspin_wait_acquire (& testLock , 10000 );
86
86
emscripten_outf ("TEST_WAIT_ACQUIRE: %d (expect: 1)" , result );
87
87
assert (result );
@@ -96,7 +96,7 @@ bool ProcessAudio(int numInputs, const AudioSampleFrame *inputs, int numOutputs,
96
96
whichTest = TEST_WAIT_INFINTE_1 ;
97
97
break ;
98
98
case TEST_WAIT_INFINTE_1 :
99
- // Still locked when we enter here but move on in the main thread
99
+ // Still locked when we enter here but move on in the worker
100
100
break ;
101
101
case TEST_WAIT_INFINTE_2 :
102
102
emscripten_lock_release (& testLock );
@@ -137,7 +137,7 @@ void WorkerLoop() {
137
137
break ;
138
138
case TEST_WAIT_ACQUIRE :
139
139
if (!didUnlock ) {
140
- emscripten_out ("main thread releasing lock" );
140
+ emscripten_out ("Worker releasing lock" );
141
141
// Release here to acquire in process
142
142
emscripten_lock_release (& testLock );
143
143
didUnlock = true;
@@ -147,7 +147,7 @@ void WorkerLoop() {
147
147
// Spin here until released in process (but don't change test until we know this case ran)
148
148
whichTest = TEST_WAIT_INFINTE_2 ;
149
149
emscripten_lock_busyspin_waitinf_acquire (& testLock );
150
- emscripten_out ("TEST_WAIT_INFINTE (from main )" );
150
+ emscripten_out ("TEST_WAIT_INFINTE (from worker )" );
151
151
break ;
152
152
case TEST_DONE :
153
153
// Finished, exit from the main thread (and return out of this loop)
0 commit comments