摘要:
We can’t avoid dealing with state, but we have three options:• Shared mutability• Isolated mutability• Pure immutabilityThough we’re used to shared mutability, we should avoid it as much aspossible. Eliminating shared mutable state is the easiest way to avoid synchronizationwoes. It takes us far mor 阅读全文
摘要:
Here are the ways to reap the benefits of multicore processors:• We have to divide the application into multiple tasks that can be runconcurrently.• We should choose at least as many threads as the number of cores,provided the problem is large enough to benefit from those many threads.• For computat 阅读全文