667 Subj : Re: Thoughts about threads in C++ To : comp.programming.threads From : Jomu Date : Sat Apr 30 2005 11:49 am Maciej Sobczak wrote: > Hi, > > Jomu wrote: > > >>No. I do not want the "lock" regions and friends. I want explicit > >>objects on which threads can synchronize by calling their methods. > > > > Mutex > > > >>and convar are obvious in this approach. > > > > > > They are not, and for one very simple reason - with "lock" and > > friends you have implicit finalization of "lock" section. Programmers > > do not have to count their locks and match them with their unlocks if > > you add this in your syntax. This is more important than do you or do > > you not know/have/use thread id or how do you "join" your threads. > > I thought that I wrote about *RAII* handlers for the synchronization > objects, like Boost's mutex::lock. > > > > It is there. You certainly skipped the "Library support" part. It is maybe because of me "not talking C++" here that I am not understood well. You can improvise one thing one way, another thing another way. You plan to use one add-on to do locking, and create another to define concurrency. In my book, this mixup is not good design technique. .... > > > > You don't need POSIX for this on most platforms :). > > I know, but implementability in terms of POSIX means that it is nothing > really esotheric. All is implementable in good old assembly. That means nothing :). > > -- > Maciej Sobczak : http://www.msobczak.com/ > Programming : http://www.msobczak.com/prog/ . 0