Hello, With latest EMSDK 2.0.20 I'm trying to use wait and signal using pthread_cond_signal() and pthread_cond_wait() functions.
I'm consistently seeing this issue between two non-UI threads that after a pthread_cond_signal() , a previously waiting pthread_cond_timedwait() only comes out after 1-2 seconds delay, expectation is that it should be ready at max within the scheduling interval. The first row shows time just before entering wait(), later are pairs of times of when actual event is generated and point just before signal() is called, there's barely any difference. Many such events pass until we come out of wait and see the last 'Post wait' is printed, it takes 1.56 seconds to return even though event is already signaled. All times are epoch times retrieved via clock_gettime(CLOCK_REALTIME, ...) option. Wait start time 1620415241.405 Event generation time 1620415241.859 0.454 Signaling time 1620415241.859 0.454 Event generation time 1620415242.300 0.895 Signaling time 1620415242.300 0.895 Event generation time 1620415242.329 0.924 Signaling time 1620415242.329 0.924 Event generation time 1620415242.465 1.060 Signaling time 1620415242.465 1.060 Event generation time 1620415242.738 1.333 Signaling time 1620415242.738 1.333 Event generation time 1620415242.833 1.428 Signaling time 1620415242.833 1.428 Event generation time 1620415243.163 1.758 Signaling time 1620415243.163 1.758 Event generation time 1620415243.248 1.843 Signaling time 1620415243.249 1.844 Post wait time 1620415243.418 2.013 1.559 Any pointers would be greatly appreciated. Thanks, Sarang. -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/0e73db37-aa12-43fc-948e-ef9622f2dc03n%40googlegroups.com.
