Title: TRtcClientModule in multithread Post by: ISIGest on July 06, 2018, 02:50:24 PM Hi, I've an app that use TRtcClientModule in a datamodule and multiple thread use it to make remote call.
I use Prepare method to initialize a call and Call method to call a prepared function. All work fine but I've a problem in a multi-thread situation... For example we have Thread1 (called T1) and Thread2 (called T2): T1 prepare a function and this preparing make some time, meantime T2 need to prepare another function and call them. This is a big problem because the T2 prepare clear the T1 function and the only T2 call is ok, after that the function of T1 is called and I got obviously an error. Regards Title: Re: TRtcClientModule in multithread Post by: D.Tkalcec (RTC) on July 07, 2018, 08:10:09 AM Did you set the HyperThreading property on your TRtcClientModule component to TRUE? With HyperThreading=TRUE, a separate "Data" object is created for every thread where a remote function call is being prepared, allowing you to prepare multiple remote function calls at the same time from different threads. OTOH, if you leave the HyperThreading property at its default value (FALSE), only one "Data" object is used by the TRtcClientModule component, which would explain the behavior you are describing.
Title: Re: TRtcClientModule in multithread Post by: ISIGest on July 07, 2018, 08:16:57 AM This is very good.... I try it...regards
|