Ole,

RobberA is robbing a bank and posts her accomplice, RobberB, outside the
door to keep watch. Independently, RobberC arrives on the scene to rob the
bank as well, noticing that the bank is <<being>> robbed, she takes off and
vows to give up her life of crime.

Compare: RobberA&B finish their hard days work and leave, when RobberC
arrives, .2s later, to Rob a bank that has no money, three dead clerks, a
screaming child and cops on their way. RobberC gets hanged for murder.

Compare: RobberA&B finish their hard days work and leave, when RobberC
arrives, 1s later, and notices the bank security guard coming out the door
in pursuit of RobberA&B. RobberC robs a different bank.

The case I was differentiating was between 0 && !0 where actionable
information is held by the mutex or semaphore itself, and no other
variables are required. Obviously in the difference between .2 and 1 is not
contained within the semaphore but in some other time variable.

With that said, I have no intention of robbing a bank, at least in the
foreseeable future, and the question from my side at least was pure
pedantry. I withdraw the question ;)

Thanks again for your great work, and--just as importantly--careful
oversight of this forum.

Bradley

On Sun, Jan 4, 2015 at 6:26 AM, Ole Tange <o...@tange.dk> wrote:

> On Sat, Jan 3, 2015 at 10:09 PM, Bradley <b...@customweather.com> wrote:
> >> On Jan 3, 27 Heisei, at 11:21 AM, Ole Tange <o...@tange.dk> wrote:
> >>> On Fri, Jan 2, 2015 at 8:53 PM, Bradley Asztalos <
> b...@customweather.com> wrote:
> >>>> On Fri, Jan 2, 2015 at 7:35 AM, Ole Tange <o...@tange.dk> wrote:
> >>>> On Fri, Jan 2, 2015 at 10:51 AM, Bradley Asztalos
> >>>> <b...@customweather.com> wrote:
> :
> >>> Does --semaphoretimeout 0 mean never give up?
> >>
> >> Yes: Just as if the option had not been given.
> >>
> >>> If so then -0 could mean give up immediately.
> >>
> >> -0 = 0, so no.
> >>
> >> It is implemented in the git version.
> :
> > So did you provide for a way to give up immediately if sem cannot be
> acquired immediately?
>
> As mentioned, no.
>
> If you feel that is very important, please provide a situation where
> waiting 1 sec for the semaphore before giving up is much worse than
> waiting 0.2 sec (which is more or less the time it takes to run sem).
> I could not find a situation in which that extra second made a huge
> difference. On the contrary I can easily find situations where giving
> up immediately is less useful than trying for just a second.
>
> /Ole
>

Reply via email to