Do pthreads libraries support cooperative threads?
Paul Bandler wrote: > > Bryan O’Sullivan wrote: > > > > p> Thanks for those who have sent some interesting replies (although > > p> no-one seems to think its a good idea to not go all the way with > > p> pre-emptive pthreads). > > > > This is because you can’t go halfway. Either you use pthreads in a > > fully safe manner, or your code breaks horribly at some point on some > > platform. > > OK, so you would disagree with the postings below from Frank Mueller and > David Butonhof in July that indicates it is possibe (if inadvisable)? > > Frank Mueller wrote: > > > >Raphael.Schumacher@SWISSTELECOM.COM (Schumacher Raphael, GD-FE64) >writes: > >[deleted…] > > > 1) Do pthreads libraries support cooperative threads? > > > > In a way, somewhat. Use FIFO_SCHED and create all threads at the same priority level, > > and a thread will only give up control on a blocking operation, e.g. yield, cond_wait, > > mutex_lock and (if thread-blocking is supported) maybe on blocking I/O (read, write, acce