Wrapping Up
While we can rely on transistor counts on modern chips to continue increasing in accordance with Moore’s Law (for now at least), we can no longer rely on a resulting increase in clock speed. Instead, we should expect an ever-growing number of cores per chip. The future belongs to languages that can automatically leverage more cores as they become available.
We’ve covered several areas where we can use extra cores to do more work. First we considered performing asynchronous work on a background thread with future. Futures should be your first choice when you need to execute an asynchronous task and possibly communicate back the result. If you need multiple values or delivery from any place in the asynchronous task, use promises. If ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access