|Subject:||Re: Assign to threadpools manually|
|Posted by:||Remy Lebeau \(Indy Team\) (re…@lebeausoftware.org)|
|Date:||Tue, 22 Feb 2011|
"Andreas B" <a.bartus…@consense-gmbh.de> wrote in message
> The idea was to add a second ThreadPool for the second
> language (our localization unit is able to check which thread
> called it) and to assign the users to the two pools manually
> depending on the language.
Indy does not support multiple pools on a single server. You would have to
write your own custom TIdScheduler class for custom threading, or else
implement a custom load balancer that delegates to separate TIdHTTPServer
components as needed.
I don't think any of that is necessary, though. TIdScheduler is responsible
for creating threads, not what the threads do while running. Every time the
TIdHTTPServer.OnCommandGet event handler fires, it is running in a thread
context assigned to each connected client. You should do any localizing you
need inside that event handler when generating the content that you send to
each client. You have access to the languages and charsets that the client
reports support for (via its "Accept-..." request headers).
Remy Lebeau (TeamB)
Assign to threadpools manually posted by Andreas B on Tue, 22 Feb 2011