SRT API calls from the same OS thread #2831
curiousWanderer1982
started this conversation in
General
Replies: 1 comment 1 reply
-
SRT is also using its own threads, so a single call to extracting a payload from the receiver buffer (ths |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My question was whether it was ok to call the SRT APIs (like srt_recvmsg etc) potentially from a different OS thread each time, for performing operations on a given socket.
As a simplified example, assuming the application has 4 OS threads created (T1, T2, T3, T4) and a goroutine (G1), would the following sequence of calls to receive SRT payload work fine?
T1 --> srt_recvmsg (from G1)
// Go runtime 'moves' G1 to T2
T2 --> srt_recvmsg (from G1)
// Go runtime 'moves' G1 to T3
T3 --> srt_recvmsg (from G1)
// Go runtime 'moves' G1 to T4
T4 --> srt_recvmsg (from G1)
OR, would all the calls into the SRT APIs always need to happen from the same OS thread?
Something like:
T1 --> srt_recvmsg (from G1)
T1 --> srt_recvmsg (from G1)
T1 --> srt_recvmsg (from G1)
T1 --> srt_recvmsg (from G1)
where, goroutine G1 needs to be 'locked' to a single OS thread, like T1?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions