@@ -41,7 +41,7 @@ typedef enum {
4141
4242// Lock used in all the tests
4343emscripten_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 )
4545_Atomic Test whichTest = TEST_NOT_STARTED ;
4646// Time at which the test starts taken in main()
4747double startTime = 0 ;
@@ -81,7 +81,7 @@ bool ProcessAudio(int numInputs, const AudioSampleFrame *inputs, int numOutputs,
8181 whichTest = TEST_WAIT_ACQUIRE ;
8282 break ;
8383 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
8585 result = emscripten_lock_busyspin_wait_acquire (& testLock , 10000 );
8686 emscripten_outf ("TEST_WAIT_ACQUIRE: %d (expect: 1)" , result );
8787 assert (result );
@@ -96,7 +96,7 @@ bool ProcessAudio(int numInputs, const AudioSampleFrame *inputs, int numOutputs,
9696 whichTest = TEST_WAIT_INFINTE_1 ;
9797 break ;
9898 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
100100 break ;
101101 case TEST_WAIT_INFINTE_2 :
102102 emscripten_lock_release (& testLock );
@@ -137,7 +137,7 @@ void WorkerLoop() {
137137 break ;
138138 case TEST_WAIT_ACQUIRE :
139139 if (!didUnlock ) {
140- emscripten_out ("main thread releasing lock" );
140+ emscripten_out ("Worker releasing lock" );
141141 // Release here to acquire in process
142142 emscripten_lock_release (& testLock );
143143 didUnlock = true;
@@ -147,7 +147,7 @@ void WorkerLoop() {
147147 // Spin here until released in process (but don't change test until we know this case ran)
148148 whichTest = TEST_WAIT_INFINTE_2 ;
149149 emscripten_lock_busyspin_waitinf_acquire (& testLock );
150- emscripten_out ("TEST_WAIT_INFINTE (from main )" );
150+ emscripten_out ("TEST_WAIT_INFINTE (from worker )" );
151151 break ;
152152 case TEST_DONE :
153153 // Finished, exit from the main thread (and return out of this loop)
0 commit comments