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

2022-10-21 Thread Luca Olivetti via fpc-pascal
Hello, I'm using a TFPHTTPServerHandler in threaded mode. I'm also using a TJSONRpcModule. I see that, even if the calls come from different threads, only one instance of the rpc module is ever created (on demand, the first time an rpc request comes in) and used. Since I'm relying on this behav

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

2022-10-21 Thread Michael Van Canneyt via fpc-pascal
On Fri, 21 Oct 2022, Luca Olivetti via fpc-pascal wrote: Hello, I'm using a TFPHTTPServerHandler in threaded mode. I'm also using a TJSONRpcModule. I see that, even if the calls come from different threads, only one instance of the rpc module is ever created (on demand, the first time an rp

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

2022-10-21 Thread Luca Olivetti via fpc-pascal
El 21/10/22 a les 9:39, Michael Van Canneyt via fpc-pascal ha escrit: And a property of your module:  property Kind: TWebModuleKind read FWebModuleKind write FWebModuleKind default wkPooled; wkPooled is the default, but if you explicitly set this to 'wkPooled' in the constructor, you'll be

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

2022-10-21 Thread Luca Olivetti via fpc-pascal
El 21/10/22 a les 9:48, Luca Olivetti via fpc-pascal ha escrit: El 21/10/22 a les 9:39, Michael Van Canneyt via fpc-pascal ha escrit: And a property of your module:   property Kind: TWebModuleKind read FWebModuleKind write FWebModuleKind default wkPooled; wkPooled is the default, but if you

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

2022-10-21 Thread Luca Olivetti via fpc-pascal
El 21/10/22 a les 9:57, Luca Olivetti via fpc-pascal ha escrit: El 21/10/22 a les 9:48, Luca Olivetti via fpc-pascal ha escrit: El 21/10/22 a les 9:39, Michael Van Canneyt via fpc-pascal ha escrit: And a property of your module:   property Kind: TWebModuleKind read FWebModuleKind write FWebM

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

2022-10-21 Thread Michael Van Canneyt via fpc-pascal
On Fri, 21 Oct 2022, Luca Olivetti via fpc-pascal wrote: El 21/10/22 a les 9:57, Luca Olivetti via fpc-pascal ha escrit: El 21/10/22 a les 9:48, Luca Olivetti via fpc-pascal ha escrit: El 21/10/22 a les 9:39, Michael Van Canneyt via fpc-pascal ha escrit: And a property of your module:   p

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

2022-10-21 Thread Luca Olivetti via fpc-pascal
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. Meanwhil

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

2022-10-21 Thread Luca Olivetti via fpc-pascal
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