Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Do pthreads libraries support cooperative threads?

0
Posted

Do pthreads libraries support cooperative threads?

0

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

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123