Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Kaz Kylheku Newsgroups: comp.lang.c,comp.programming.threads Subject: Re: Trivial C11 threads.h wrapper (public domain) Followup-To: comp.lang.c Date: Fri, 28 Sep 2012 19:38:38 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 16 Message-ID: <20120928123157.421@kylheku.com> References: <50646436$0$13270$4fafbaef@reader2.news.tin.it> NNTP-Posting-Host: X+c6YNb3AaWMPA3YfA4opg.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org User-Agent: slrn/pre1.0.0-18 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.c:26777 comp.programming.threads:1115 On 2012-09-27, John Tsiombikas wrote: > *gasp* ... it's absolute time ?! I must admit I never used > timedlocks... > > I suppose that makes it easier to ask it to try locking the mutex > until next friday at 3 o'clock or something :) What it allows you to do is resume an interrupted wait, so that the wakeup still happens at the originally predetermined time. With absolutely measured suspensions, you can make a thread wake up, say 10 times a second regardless of the duration of the processing that takes place in betwen the wakeups (so long as it does not overrun the 0.1 second interval). In one hour, it will wake up exactly 36000 times. That kind of timing is sometimes required in real-time programming.