[fpc-pascal] Threaded webserver and TJSONRPCModule instances: can I be sure there's only one?

Luca Olivetti luca at ventoso.org
Fri Oct 21 17:17:35 CEST 2022


El 21/10/22 a les 17:09, Luca Olivetti via fpc-pascal ha escrit:
> El 21/10/22 a les 12:48, Michael Van Canneyt via fpc-pascal ha escrit:
> 
>>> I see that Kind is used after the module has been created, so setting 
>>> it in either method (CreateNew or DataModuleCreate) should be OK, am 
>>> I right?
>>
>> You are right.
>>
>> I will publish the method. That's an oversight.
> 
> Meanwhile I changed the method I use to route the calls to the main 
> thread (Application.QueueAsyncCall instead of a critical section and 
> Synchronize) so it doesn't matter any more if there is just one instance 
> or more than one.

Now that I think of it, even with the previous method it wouldn't have 
mattered (since each instance would have been using its own critical 
section and other fields).

Bye
-- 
Luca



More information about the fpc-pascal mailing list