May 2018
Beginner to intermediate
290 pages
6h 43m
English
The separating effect of immutability and per-thread dynamic binding means that we don’t have to worry quite so much about one thread accidentally interfering with the operation of another, which is a great first step. But it’s only a first step. Having separated our threads for their own safety, we now need to figure out how to get them to work together. Sometimes this isn’t a problem. Some threads are born to silently do a job and silently expire:
| | ;; Delete a file in the background. |
| | |
| | (.start (Thread. #(.delete (java.io.File. "temp-titles.txt")))) |
But more often we want some kind of result back from the thread we just fired off. How many copies did we sell? And what was the revenue? Or simply, Is this thread done? ...
Read now
Unlock full access