3b9 Subj : Re: returning arguments To : comp.programming.threads From : Joe Seigh Date : Mon Jun 27 2005 12:32 pm Huub wrote: >> Find a book or something that explains the producer/consumer pattern. >> Assuming you need asynchronicity. Explain why >> for (;;) { >> read_iterface1(); >> write_iterface2(); >> } >> >> won't suffice. >> > > That's what I started with. But a collegue advised to use a thread since > that would work better. I'm not experienced enough to argue about that, > so I followed his advise. And since he's not present for some time, I > can't ask his advise. > Well, look up single producer / single consumer solutions with semaphores since it sound like you might have some realtime contraints and semaphores probably work better in a realtime environment condition variables do. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. . 0