Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #636
| From | Alexander Terekhov <terekhov@web.de> |
|---|---|
| Newsgroups | comp.programming.threads |
| Subject | Re: can pthread_mutex_trylock() give up the timeslice? |
| Date | 2011-10-15 13:53 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <4E99744C.36B91DCA@web.de> (permalink) |
| References | <996e61f0-62c3-4960-9f1f-3926af713c34@b41g2000yqd.googlegroups.com> <0e75e91b-526a-48d3-900c-f5a9a4315e4e@b41g2000yqd.googlegroups.com> <b5165308-724e-404d-9859-dcbdd8c8fe24@l10g2000pra.googlegroups.com> |
Brendon wrote: [...] > My plan now will be just to go along and do the work using a try-lock > (not a huge change) if it shows some issues then look at another > solution. I just wanted to ask and see if anyone here has heard of > pthread_mutex_trylock() prematurely giving up a timeslice and so far Realtime aside, implementations of pthread_mutex_trylock() are allowed to give up a time slice. If you really think that that is a problem for your code then use C/C++ atomics to implement your own mutex with trylock() not giving up a timeslice: http://lists.boost.org/Archives/boost/2004/05/65435.php (auto_reset_event is a binary semaphore in posix speak) regards, alexander.
Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
can pthread_mutex_trylock() give up the timeslice? Brendon <brendon.j.costa@gmail.com> - 2011-10-13 16:05 -0700
Re: can pthread_mutex_trylock() give up the timeslice? Alexander Terekhov <terekhov@web.de> - 2011-10-14 11:50 +0200
Re: can pthread_mutex_trylock() give up the timeslice? Joshua Maurice <joshuamaurice@gmail.com> - 2011-10-14 13:43 -0700
Re: can pthread_mutex_trylock() give up the timeslice? Brendon <brendon.j.costa@gmail.com> - 2011-10-14 16:56 -0700
Re: can pthread_mutex_trylock() give up the timeslice? Alexander Terekhov <terekhov@web.de> - 2011-10-15 13:53 +0200
Re: can pthread_mutex_trylock() give up the timeslice? David Schwartz <davids@webmaster.com> - 2011-10-15 21:41 -0700
csiph-web