首页 > 代码库 > Concurrency

Concurrency

The real problem with concurrency occurs when tasks that are executing in parallel begin to interface with each other. This can happen in such a subtle and occasional manner that it‘s probably fair to say that concurrency is "arguably deterministic but effictively nondeterministic" That is, you can make an argument to conclude that it‘s possible to write concurrent programs that, through care and code inspection, work correctly. In practic, however, it‘s much easier to write concurrent programs that only apear to work, but given the right conditions, will fail. These conditions may never actually occur, or orccur so infrequently that you never see them during testing. In fact, you may not be able to write test code that will generate failure conditions for your concurrent program. The resulting failures will often only occur occasionally, and as a result they appear in the form of customer complaints. This is one of the strongest arguments for studying concurrency: If you ignore it, you‘re likely to get bitten.

 

Concurrency