The 80’s Algorithm to Avoid #RaceConditions (and Why It Failed)
Los mutex permiten solucionar el problema de las race condition en programación concurrente. En este articulo te explico como usarlos correctamente.
Articulo disponible en formato audiblog: Introducción En un entorno de programación concurrente, varios hilos de ejecución pueden intentar acceder a un mismo recurso al mismo tiempo. Si este acceso concurrente no se controla de alguna manera, pueden ocurrir condiciones de carrera, que tal y como analicé en un articulo anterior, pueden generar resultados inconsistentes e impredecibles.
En este articulo os explico que son las race condition (o condiciones de carrera) en el contexto de la programación concurrente de software.
Malconcurrency: A Proposed New Term
https://synystron.substack.com/p/malconcurrency-a-proposed-new-term
new post on my blog. related to software engineering, programming and multi-threading
#concurrency
#raceconditions
#dataraces
#threading
#multithreading
#concurrentprogramming
A proposal: I'd like to coin "malconcurrency" as a new, better term for what we previously referred to as a race condition, data race or thread race. Why? It avoids confusion by readers/listeners who might accidentally assume that "race" meant in the sense of a humam race, ethnicity or skin color. By using a distinct word we avoid that tar pit entirely. This concern seems increasingly important in an era where folks feel they need to be more careful in a professional or academic context lest they be accused of racism or discrimination.
📷 The recording of my talk at #reactdayberlin is finally out. Talk is about #RaceConditions #Testing in #JavaScript applied to the #React world
https://portal.gitnation.org/contents/break-the-race-easy-race-condition-detection-for-react
<span>Race conditions are among some of the most challenging to detect and reproduce issues. As such they pose a significant challenge in development notably in UI. In this talk, we explore how to detect race conditions by leveraging fuzzing techniques. We walk you through discovering the real problem of race conditions and how they impact user experience. We provide you tools and examples demonstrating how to easily detect them in your daily work thanks to tests relying on fuzzing. After that talk, we hope your React code will be race conditions free or at least that you will have the right tools to help you.</span>
Me: oh - yup, the issue is we have a data race
Fitness business client: YES!
Me: no. No. That’s bad. I’ll just introduce a mutex to fix…
Fitness business client: don’t fix it.
Me: but…
Fitness business client: last one to the line pays for breakfast
Me: that’s not how this works…
Fitness business client: that’s exactly what a loser would say
So again, in theory it'd be trivial to make the program #MultiTask, because it was inherently fight-proof -- there wouldn't be any #RaceConditions or #Deadlocks, because the only data being shared never changed.
10/