|
|
|
|
|
by mnw21cam
4568 days ago
|
|
Here is where you need to be really careful. How do you know all the threads have terminated? That's communicated through a lock in the underlying . Certainly some systems (such as Java and multiple CPUs with independent caches) that use thread-local working areas, you cannot rely on a task being completed meaning that you can actually use the data it has produced, until you actually make use of a lock. The lock ensures that the local copy is synchronised with the central copy. There's plenty of opportunity for fun if you don't use locks in some form or other in multi-threaded systems. |
|