RTC Forums
April 19, 2024, 04:35:27 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: TRtcClientModule in multithread  (Read 4176 times)
ISIGest
RTC Expired
*
Posts: 121


« 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
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 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.
Logged
ISIGest
RTC Expired
*
Posts: 121


« Reply #2 on: July 07, 2018, 08:16:57 AM »

This is very good.... I try it...regards
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.023 seconds with 16 queries.