   Talking Threads
 ArticleAuthor: Maz Wiernikowski <maz@winterdyne.co.uk>FogBugz Case Number: 20213Original submission e-mail contents:Quote:This was suggested, don't know if it's good enough. :-) Still, my crack at it.
  Pretty good. The language is clear and the topics covered make up the bulk of what anyone needs to know about threading. The main missing item is inter-thread communication - e.g. using events and queues to pass messages between threads. He sort of implies it in a few places, but an explicit coverage + code sample would be ideal.;Quote:Original post by superpigPretty good. The language is clear and the topics covered make up the bulk of what anyone needs to know about threading.That's really arguable, but as an introduction to the subject its decent.Quote:The main missing item is inter-thread communication - e.g. using events and queues to pass messages between threads. He sort of implies it in a few places, but an explicit coverage + code sample would be ideal.Events really should be avoided at all costs, they are complex to use properly, and a very primitive synchronization method that has many subtle problems most people don't understand. He's also wrong about the standard containers, only a few containers actually invalidate all iterators under general insertion and deletion operations, and even then not always. His description of what a deadlock is is highly confusing at best, wrong at the worst. Since his article seems to be geared torwards C++, he should have some mention of the volatile keyword and its purpose. He also should perhaps make mention that one can wait on a thread, wait for multiple objects (at least in windows), the alertable wait functions would ideally be covered as well. More detail would also be good, especially in the areas of determining what to parallelize, OpenMP, avoiding thread starvation, avoiding resource contention, costs of using operating system synchronization objects...   ;  Maybe Washu should write an article as well.   ;Quote:Original post by RavuyaMaybe Washu should write an article as well.Washu should write a book (or books) as well [grin]Jack   