Please enable JavaScript.
Coggle requires JavaScript to display documents.
Concurrency (Detached threads (Run in background, Pass ownership to C++…
Concurrency
-
Race condition
Anything where the outcome depends on the relative ordering of execution of operations on two or more thread
Solutions
-
Modify the design of your data structure and its invariants so that modifications are done as a series of indivisible changes, each of which preserves the invariants
Handle the updates to the data structure as a transaction, just as updates to a database are done within a transaction.
-
-
-
-
Task parallelism
Divide a single task into parts and run each in parallel, thus reducing the total runtime
-
-
-