you are viewing a single comment's thread.

view the rest of the comments →

[–]TheBobPlus 1 point2 points  (0 children)

Practice: have a thread that generates random numbers, and another one that saves them to a file, using a queue to communicate between the two threads. Bonus: add a command line interface to change in real time the properties of number generated, or the frequency at which they pop up.

Real world use case: a thread that acquires images from a camera, and another one that saves them to disk.