You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
Hi @davehorton
We are using mod_audio_fork module. I was going through the code and could not understand the need to acquire/lock multiple mutexes in func fork_frame()
mutex part of variable type struct private_data is acquired at lws_glue.cpp#L530.
mutex part of class AudioPipe and used to access the audio buffers is acquired at lws_glue.cpp#L541
Also, this callback is invoked from func switch_core_session_read_frame() in switch_core_io.c inside a lock (bug->read_mutex). So I could not understand the need to acquire multiple mutexes in fork_frame().
Could you please throw some pointers as to what I missed?
Thanks.
The text was updated successfully, but these errors were encountered:
I seem to have found the missing piece of my understanding.
struct private_data is accessed in 2 different threads - fork_frame() and fork_session_cleanup(). I believe they can be invoked by FS in 2 different threads.
same for object of type AudioPipe. It is accessed in fork_frame() and in AudioPipe::lws_callback() for case LWS_CALLBACK_CLIENT_WRITEABLE. Need to check what that case means.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi @davehorton
We are using
mod_audio_fork
module. I was going through the code and could not understand the need to acquire/lock multiple mutexes in funcfork_frame()
struct private_data
is acquired at lws_glue.cpp#L530.AudioPipe
and used to access the audio buffers is acquired at lws_glue.cpp#L541Also, this callback is invoked from func
switch_core_session_read_frame()
inswitch_core_io.c
inside a lock (bug->read_mutex
). So I could not understand the need to acquire multiple mutexes infork_frame()
.Could you please throw some pointers as to what I missed?
Thanks.
The text was updated successfully, but these errors were encountered: