Crash my webserver!
Andrea Fontana
nospam at example.org
Sun May 14 15:51:25 UTC 2023
On Sunday, 14 May 2023 at 15:19:24 UTC, psyscout wrote:
> On Saturday, 13 May 2023 at 09:03:22 UTC, Andrea Fontana wrote:
>> Hi everyone, as I had already announced in the discord
>> channel...
>
> Hi Andrea,
>
> this question may be not completely related, but hopefully you
> can answer. I can see a worker concept and each worker is a
> completely separate application and doesn't share context with
> other workers.
>
> For example I have a __gshared state with some data which is
> being updated by separate thread. So I need all workers
> (threads) be able to access that state without recreating it
> multiple times.
>
> Is it possible to achieve it without introducing a separate
> cache or database, just inside single app and Serverino serving
> data requests through multiple threads?
No: workers are not separated threads, but isolated processes.
You should consider that workers' count is dynamic; they can be
created and killed if required.
You can still use some ipc (sockets, pipes) etc but probably a db
it's easier to manage.
Andrea
More information about the Digitalmars-d
mailing list