From: Brian R. <row...@ha...> - 2000-12-31 15:09:05
|
Juan Jose Blanch wrote: > I won't code Value, as it is a bad practice to look at it. > Anyway you shouldn't use Semaphores, very often, as it is a goto. > If you need Semaphores, just please encapsulate it in a class like, > example: > A buffer guarder by semaphores, just it is a Queue protected with > semaphores( what I am going to do ). > > Do you understand? > Anyway I would like to know where and why do you want semaphores? Semaphores looked more versitile based on the threading web-pages I've read. They seemed better. But I'm going to use them for locking the MessageQueue that each MessageHandler will have. Unless you think that a mutex would be better. -- "Teach a man to make fire, and he will be warm for a day. Set a man on fire, and he will be warm for the rest of his life." - John Hrastar |