[interfacekit] Re: deadlock with BApplication/BWindow

On 2005-03-12 at 19:38:54 [+0100], Adi Oanca wrote:
> Adi Oanca wrote:
> > Ingo Weinhold wrote:
> > 
> >>>    _Lock(BLooper* loop, port_id port, bigtime_t timeout)
> >>> is always called with 'this' and '-1'
> >>> so 'loop' will always be valid. IsLooperValid() checks for 'loop' in
> >>> the global
> >>> list and if not, return error. But this will always return true,
> >>> unless the looper
> >>> has been deleted and this is an illegal call, in which case it's
> >>> right to fail with
> >>> a segmentation fault.
> >>>
> >>>    Maybe I am missing something, and if that's the case, please tell
> >>> me    what.
> >>>    If not, can we please remove the above lines? They are useless and
> >>>    introduce
> >>> lots of CPU cycles.
> >>
> >>
> >>
> >> Your assumption that invoking BLooper::Lock() on an invalid looper is
> >> not allowed is not correct. It is completely OK to do that. Just like
> >> calling PostMessage().
> > 
> > 
> >     Why? It would realise nothing. And it's wrong. Why do you say it's
> > correct?
> 
>     I got it, it can say if the looper is still valid or not. :-)

Bingo! :-P

CU, Ingo

Other related posts: