Maciej Sobczak wrote:
> 
> Hi,
> 
> Alexander Terekhov wrote:
> 
> > Show me some code. I mean something that shows why do you need counting
> > semas.
> 
> This wording is too strong. Going this way, we can *always* say that
> feature X is not deadly needed and can be replaced by two or more
> (probably lower-level) features Y.
> We could write assembly as well.

But C/C++ is nothing but "modern assembly" ("more or less" portable one).

> 
> The problem with semas is that many textbooks use them as a mean to
> describe some ideas. 

Yeah. Well, I've got a suggestion for all semaphore lovers here. 

There's a GNU textbook dedicated to semas... how about starting an "open 
source" *boost* project to "extend" it with solutions based on mutexes and 
condition variables? You'll not only learn how to use condvars (and, believe 
me, you'll realize rather quickly that monitors based on MESA/POSIX condvars 
are much, much better than anything you could do with semas), but you'll 
also do something kinda useful for this little planet.

>                       A lot of algorithms are explained in terms of semas
> and mutexes, and not in terms of mutexes and condvars.

http://terekhov.de/downey03semaphores.pdf

regards,
alexander.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to