Sign In Register

How can we help you today?

Start a new topic
Answered

Is Unity SDK RTSession.SendBytes and SendData threadsafe?

We're hoping to call the RTSession.SendBytes & SendData from a background thread, and couldn't find any documentation on whether they are threadsafe. Are they?


Best Answer

Hi Zak,


Could you explain your particular use case a bit more here? I think StartCoRoutine essentially runs a function in another thread when used in conjunction with yield. We use IEnumerator functionName() as we are essentially spawning a collection of these functions that are iterated through and executed when used with WaitForSeconds. You can think of it as processing functions with a delay, outside of the Update loop. This might be the best approach for your problem here.


Kind regards,

 - Steve


1 person has this question
1 Comment

Answer

Hi Zak,


Could you explain your particular use case a bit more here? I think StartCoRoutine essentially runs a function in another thread when used in conjunction with yield. We use IEnumerator functionName() as we are essentially spawning a collection of these functions that are iterated through and executed when used with WaitForSeconds. You can think of it as processing functions with a delay, outside of the Update loop. This might be the best approach for your problem here.


Kind regards,

 - Steve

Login to post a comment