Js multiple concurrency problem (a problem with some depth)

scenario: two pages are independent of each other, and the JavaScript code in them executes independently of each other. The js of these two pages share a common variable shareArray array in localStorage

Action
1, page A stores a piece of data in shareArray
2, page B deletes a piece of data from shareArray

question:
from the above point of view, it has satisfied the concurrency problem caused by adding and modifying a common variable at the same time in case of multiple concurrency. What I want to know is how the front end handles such a problem and ensures data consistency in extreme cases

.
Nov.04,2021

if concurrency must be achieved through Storage, using StorageEvent is a better way

of course, a better option is to use IndexDB, which has a transaction mechanism

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3efda-2c44f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3efda-2c44f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?