b*g 发帖数: 644 | 1 3. Preventing concurrent access to shared variables by threads
When writing multi-threaded applications, many programmers (myself
included) often cut corners, and leave their applications and applets
vulnerable to thread conflicts. When two or more threads access the same
data concurrently, there exists the possibility (and Murphy's law
holding, the probability) that two threads will access or modify the
same data at the same time. Don't be fooled into thinking that such
problems won't occur on |
|