Implementation of concurrency primitives
Andrey Lomakin
lomakin.andrey at gmail.com
Thu Nov 18 08:00:35 UTC 2021
Probably I need to add that the application uses disk intensively, that is
why I am interested in the usage of virtual threads.
On Thu, Nov 18, 2021 at 9:59 AM Andrey Lomakin <lomakin.andrey at gmail.com>
wrote:
> Hi Cristian.
> Sure I would like to use CPU affinity at the end.
> But my primary concern is memory barriers or more widely thread safety.
>
> I mean the following, could I use for example HashMap instead of
> ConcurrentHashMap in such cases or more widely speaking, could I use data
> structures that were not designed to be thread-safe because I use
> cooperative multitasking and know that execution of methods
> will not be interrupted and in nutshell, all execution is running inside
> of the single thread, so that is a single-threaded application in nutshell
> with means to exchange data using threadsafe queues for example.
>
> On Thu, Nov 18, 2021 at 9:16 AM Cristian Lorenzetto <
> cristian.lorenzetto at gmail.com> wrote:
>
>> Interesting question, but i suspect it is not possible realize a custom
>> manager for that but you can use cpu affinity flag
>>
>> Il giorno gio 18 nov 2021 alle ore 07:44 Andrey Lomakin <
>> lomakin.andrey at gmail.com> ha scritto:
>>
>>> Good morning, guys.
>>>
>>> I am considering creating an application that will use a
>>> thread-per-core approach. Data mostly will not be shared between cores
>>> and
>>> I am going to use a single thread executor to schedule fibres.
>>>
>>> My question is may I use my own concurrency primitives which do not
>>> inject
>>> memory barriers unlike the standard concurrency primitives to
>>> achieve maximum performance and if that is not possible could you explain
>>> why?
>>>
>>> --
>>> Best regards,
>>> Andrey Lomakin.
>>>
>>
>
> --
> Best regards,
> Andrey Lomakin.
>
>
--
Best regards,
Andrey Lomakin.
More information about the loom-dev
mailing list