44

Exercises in Programming Style: sharing data among threads

 4 years ago
source link: https://blog.frankel.ch/exercises-programming-style/17/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
This is the 17th post in the Exercises in Programming Style focus series. Last week, we solved the word count problem using the Actor model: objects running on different threads and communicating through messages. This week, we will drop objects, and use data structures that are shared among the threads: such a shared structure is called data space in the book. The original Python code uses two dedicated data spaces.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK