Date: Wed, 31 May 2023 15:35:38 -0700
On Wednesday, 31 May 2023 15:29:43 PDT Phil Bouchard wrote:
> The solution is to eliminate the probability race-conditions happen at
> low-level layers so the programmer can focus on higher level
> functionalities and algorithms.
>
> If the programmer can't write proper high-level algorithms then that's
> another story.
But if the programmer can write high-level algorithms, the low-level silent
locking you're proposing is, at best, overhead. At worst, it's counter-
productive causing deadlocks that the programmer needs to workaround.
As a quick example: how would you write the code for "if the list is empty,
append value 1" (remember: multiple threads will be running this code).
> The solution is to eliminate the probability race-conditions happen at
> low-level layers so the programmer can focus on higher level
> functionalities and algorithms.
>
> If the programmer can't write proper high-level algorithms then that's
> another story.
But if the programmer can write high-level algorithms, the low-level silent
locking you're proposing is, at best, overhead. At worst, it's counter-
productive causing deadlocks that the programmer needs to workaround.
As a quick example: how would you write the code for "if the list is empty,
append value 1" (remember: multiple threads will be running this code).
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel DCAI Cloud Engineering
Received on 2023-05-31 22:35:41