RTC Forums
November 23, 2024, 03:40:28 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
TRtcClientModule in multithread
Pages: [
1
]
« previous
next »
Print
Author
Topic: TRtcClientModule in multithread (Read 5616 times)
ISIGest
RTC Expired
Posts: 121
TRtcClientModule in multithread
«
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
Re: TRtcClientModule in multithread
«
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
Re: TRtcClientModule in multithread
«
Reply #2 on:
July 07, 2018, 08:16:57 AM »
This is very good.... I try it...regards
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...