Subj : Re: How to manage time-slicing in Pthreads programs? To : comp.programming.threads From : Joe Seigh Date : Sun Feb 20 2005 10:20 am On Sun, 20 Feb 2005 15:51:10 +0100, Marcin 'Qrczak' Kowalczyk wrote: > "Joe Seigh" writes: > >>>> Unix signals are brain damaged beyond redemption. >>> >>> I wonder how would you have designed them differently. >>> >> I wouldn't have had them in the first place. > > How would you design a mechanism which allows the user to press ^C to > abort a program? Or set up a timer for a userspace thread scheduler? > > I'm not saying that I like signals, but I don't know how an alternative > could look like. > It would look like the synchronization mechanisms in pthreads or built on top of it. Also the windows synchronization api which doesn't have signals. The fact that it is nearly impossible to use unix signals correctly in threaded programs without using sigwaitinfo() or sigtimedwait() should be a clue. -- Joe Seigh .