原书出处
Software Architecture in Practice, 4th Edition
09 性能
As our example shows, race conditions can occur when two threads of control are present and there is shared state. The management of concurrency frequently comes down to managing how state is shared. One technique for preventing race conditions is to use locks to enforce sequential access to state. Another technique is to partition the state based on the thread executing a portion of code. That is, if we have two instances of x, x is not shared by the two threads and no race condition will occur.
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Software Architecture in Practice, 4th Edition/_epub-src/ch09.html
EPUB SHA-256:7e9d0139f6c82a6fe31a29bb9182f06ae35b15739f8b255fefe1363a3dcc7139