[interfacekit] Re: Fwd: BAutolock
- From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Tue, 16 Sep 2003 21:00:05 +0200 CEST
"Marcus Overhagen" <ml@xxxxxxxxxxxx> wrote:
> > > Oh my god :-)
> > Eheheh! :=)
> > BTW, I noticed lots of acquire_sem without the check for
> > B_INTERRUPTED also in our app_server.
> > We should either "fix" them or switch to blockers (didn't Be,
> > Inc. use benaphores for the real app_server?)
> As long as a thread isn't resumed or suspended
> by resume_thread(), suspend_thread()
> or is send a signal, a semaphore doesn't return B_INTERRUPTED,
> so it's save to skip that check (at least that's what I think).
That depends on what you do. Often, a B_INTERRUPTED is not want you
want to get back in any circumstances, sometimes it doesn't matter.
In normal situations, a semaphore lock won't get interrupted - but you
can't and shouldn't count on that.
> > And also in the BAutoLock code.
> > And also in the BDirectWindow code I sent to Marcus (Marcus?
> > Still around ?).
In any case, I would "swallow" B_INTERRUPTED in any public API - you
never know what a client does, and you better make it work in all
cases.
Adios...
Axel.
- References:
- [interfacekit] Re: Fwd: BAutolock
- From: Marcus Overhagen
Other related posts:
- » [interfacekit] Fwd: BAutolock
- » [interfacekit] Re: Fwd: BAutolock
- » [interfacekit] Re: Fwd: BAutolock
- » [interfacekit] Re: Fwd: BAutolock
- » [interfacekit] Re: Fwd: BAutolock
- » [interfacekit] Re: Fwd: BAutolock
- » [interfacekit] Re: Fwd: BAutolock
- » [interfacekit] Re: Fwd: BAutolock
- » [interfacekit] Re: Fwd: BAutolock
- » [interfacekit] Re: Fwd: BAutolock
- » [interfacekit] Re: Fwd: BAutolock
- » [interfacekit] Re: Fwd: BAutolock
- » [interfacekit] Re: Fwd: BAutolock
- » [interfacekit] Re: Fwd: BAutolock
- [interfacekit] Re: Fwd: BAutolock
- From: Marcus Overhagen